[Libreoffice-commits] core.git: 17 commits - compilerplugins/clang configmgr/qa cui/source desktop/source framework/inc framework/source oox/source sal/qa sc/qa scripting/source sc/source sd/source sfx2/source smoketest/smoketest.cxx svx/source sw/source toolkit/source unotest/source unotools/source

Stephan Bergmann sbergman at redhat.com
Fri Nov 6 03:34:17 PST 2015


 compilerplugins/clang/stringconstant.cxx           |  227 ++++++++++++++-------
 configmgr/qa/unit/test.cxx                         |   24 +-
 cui/source/options/optsave.cxx                     |    2 
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx |    2 
 framework/inc/properties.h                         |   11 -
 framework/source/fwe/helper/titlehelper.cxx        |    2 
 framework/source/helper/titlebarupdate.cxx         |    4 
 framework/source/layoutmanager/layoutmanager.cxx   |   10 
 framework/source/loadenv/loadenv.cxx               |    4 
 oox/source/export/drawingml.cxx                    |    6 
 oox/source/export/shapes.cxx                       |    4 
 sal/qa/rtl/strings/test_oustring_compare.cxx       |    6 
 sc/qa/unit/ucalc_formula.cxx                       |    6 
 sc/source/filter/html/htmlexp.cxx                  |    2 
 scripting/source/basprov/basmethnode.cxx           |    2 
 scripting/source/basprov/basscript.cxx             |    2 
 scripting/source/vbaevents/eventhelper.cxx         |    2 
 sd/source/filter/eppt/pptx-epptooxml.cxx           |    2 
 sfx2/source/dialog/basedlgs.cxx                    |    2 
 sfx2/source/dialog/filedlghelper.cxx               |    2 
 sfx2/source/dialog/splitwin.cxx                    |    2 
 sfx2/source/dialog/tabdlg.cxx                      |    2 
 smoketest/smoketest.cxx                            |    2 
 svx/source/dialog/imapdlg.cxx                      |   14 -
 sw/source/filter/ww8/wrtww8.cxx                    |    2 
 toolkit/source/awt/animatedimagespeer.cxx          |    2 
 toolkit/source/controls/dialogcontrol.cxx          |    6 
 toolkit/source/controls/geometrycontrolmodel.cxx   |   18 -
 unotest/source/cpp/officeconnection.cxx            |    4 
 unotools/source/config/dynamicmenuoptions.cxx      |    6 
 30 files changed, 232 insertions(+), 148 deletions(-)

New commits:
commit 938f670928683ae3251119c896a894d7204b24af
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:41 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage
    
    Change-Id: I962db9583ef9cada42a61b6a95eeea818fceeead

diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index 79d7c61..8fbed25 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <algorithm>
 #include <cassert>
 #include <limits>
 #include <stack>
@@ -48,6 +49,36 @@ SourceLocation getMemberLocation(Expr const * expr) {
     return e2 == nullptr ? expr->getExprLoc()/*TODO*/ : e2->getMemberLoc();
 }
 
+bool isLhsOfAssignment(FunctionDecl const * decl, unsigned parameter) {
+    if (parameter != 0) {
+        return false;
+    }
+    auto oo = decl->getOverloadedOperator();
+    return oo == OO_Equal
+        || (oo >= OO_PlusEqual && oo <= OO_GreaterGreaterEqual);
+}
+
+bool hasOverloads(FunctionDecl const * decl, unsigned arguments) {
+    int n = 0;
+    auto ctx = decl->getDeclContext();
+    if (ctx->getDeclKind() == Decl::LinkageSpec) {
+        ctx = ctx->getParent();
+    }
+    auto res = ctx->lookup(decl->getDeclName());
+    for (auto d = compat::begin(res); d != compat::end(res); ++d) {
+        FunctionDecl const * f = dyn_cast<FunctionDecl>(*d);
+        if (f != nullptr && f->getMinRequiredArguments() <= arguments
+            && f->getNumParams() >= arguments)
+        {
+            ++n;
+            if (n == 2) {
+                return true;
+            }
+        }
+    }
+    return false;
+}
+
 class StringConstant:
     public RecursiveASTVisitor<StringConstant>, public loplugin::RewritePlugin
 {
@@ -104,9 +135,8 @@ private:
         TreatEmpty treatEmpty);
 
     void handleOUStringCtor(
-        CallExpr const * expr, unsigned arg, std::string const & qname);
-    void handleOUStringCtor2(
-        CallExpr const * expr, unsigned arg, std::string const & qname);
+        CallExpr const * expr, unsigned arg, std::string const & qname,
+        bool explicitFunctionalCastNotation);
 
     std::stack<Expr const *> calls_;
 };
@@ -195,6 +225,35 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
         return true;
     }
     std::string qname(fdecl->getQualifiedNameAsString());
+    for (unsigned i = 0; i != fdecl->getNumParams(); ++i) {
+        auto t = fdecl->getParamDecl(i)->getType();
+        if (t->isLValueReferenceType()
+            && t->getAs<SubstTemplateTypeParmType>() == nullptr)
+        {
+            t = t->getAs<LValueReferenceType>()->getPointeeType();
+            if (t.isConstQualified() && !t.isVolatileQualified()
+                && t->isClassType()
+                && t->getAs<SubstTemplateTypeParmType>() == nullptr)
+            {
+                auto td = t->getAsTagDecl();
+                auto id = td->getIdentifier();
+                if (id != nullptr && id->isStr("OUString")) {
+                    auto nd = dyn_cast<NamespaceDecl>(td->getParent());
+                    if (nd != nullptr) {
+                        id = nd->getIdentifier();
+                        if (id != nullptr && id->isStr("rtl")) {
+                            //TODO: check rtl is outermost namespace
+                            if (!(isLhsOfAssignment(fdecl, i)
+                                  || hasOverloads(fdecl, expr->getNumArgs())))
+                            {
+                                handleOUStringCtor(expr, i, qname, true);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
     //TODO: u.compareToAscii("foo") -> u.???("foo")
     //TODO: u.compareToIgnoreAsciiCaseAscii("foo") -> u.???("foo")
     if (qname == "rtl::OUString::createFromAscii" && fdecl->getNumParams() == 1)
@@ -305,69 +364,69 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
     if (qname == "rtl::OUString::reverseCompareTo"
         && fdecl->getNumParams() == 1)
     {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::equalsIgnoreAsciiCase"
         && fdecl->getNumParams() == 1)
     {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::match" && fdecl->getNumParams() == 2) {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::matchIgnoreAsciiCase"
         && fdecl->getNumParams() == 2)
     {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::startsWith" && fdecl->getNumParams() == 2) {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::startsWithIgnoreAsciiCase"
         && fdecl->getNumParams() == 2)
     {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::endsWith" && fdecl->getNumParams() == 2) {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::endsWithIgnoreAsciiCase"
         && fdecl->getNumParams() == 2)
     {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::indexOf" && fdecl->getNumParams() == 2) {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::lastIndexOf" && fdecl->getNumParams() == 1) {
-        handleOUStringCtor(expr, 0, qname);
+        handleOUStringCtor(expr, 0, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::replaceFirst" && fdecl->getNumParams() == 3) {
-        handleOUStringCtor(expr, 0, qname);
-        handleOUStringCtor(expr, 1, qname);
+        handleOUStringCtor(expr, 0, qname, false);
+        handleOUStringCtor(expr, 1, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::replaceAll"
         && (fdecl->getNumParams() == 2 || fdecl->getNumParams() == 3))
     {
-        handleOUStringCtor(expr, 0, qname);
-        handleOUStringCtor(expr, 1, qname);
+        handleOUStringCtor(expr, 0, qname, false);
+        handleOUStringCtor(expr, 1, qname, false);
         return true;
     }
     if (qname == "rtl::OUString::operator+=" && fdecl->getNumParams() == 1) {
         handleOUStringCtor(
             expr, dyn_cast<CXXOperatorCallExpr>(expr) == nullptr ? 0 : 1,
-            qname);
+            qname, false);
         return true;
     }
     if (qname == "rtl::OUString::equals" && fdecl->getNumParams() == 1) {
@@ -549,12 +608,6 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
             TreatEmpty::Error);
         return true;
     }
-    // For places where we are calling a method with a 'const OUString&' param
-    for (unsigned i=0; i < fdecl->getNumParams(); ++i)
-    {
-        if (fdecl->getParamDecl(i)->getType().getAsString() == "const ::rtl::OUString &")
-            handleOUStringCtor2(expr, i, qname);
-    }
     return true;
 }
 
@@ -1226,11 +1279,16 @@ void StringConstant::handleCharLen(
 }
 
 void StringConstant::handleOUStringCtor(
-    CallExpr const * expr, unsigned arg, std::string const & qname)
+    CallExpr const * expr, unsigned arg, std::string const & qname,
+    bool explicitFunctionalCastNotation)
 {
     auto e0 = expr->getArg(arg)->IgnoreParenImpCasts();
     auto e1 = dyn_cast<CXXFunctionalCastExpr>(e0);
-    if (e1 != nullptr) {
+    if (e1 == nullptr) {
+        if (explicitFunctionalCastNotation) {
+            return;
+        }
+    } else {
         e0 = e1->getSubExpr()->IgnoreParenImpCasts();
     }
     auto e2 = dyn_cast<CXXBindTemporaryExpr>(e0);
@@ -1261,13 +1319,18 @@ void StringConstant::handleOUStringCtor(
         && e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr(
             res, compiler.getASTContext()))
     {
-        if (res.getZExtValue() <= 127) {
-            report(
-                DiagnosticsEngine::Warning,
-                ("in call of %0, replace OUString constructed from an ASCII"
-                 " char constant with a string literal"),
-                e3->getExprLoc())
-                << qname << expr->getSourceRange();
+        // It may not be easy to rewrite OUString(c), esp. given there is no
+        // OUString ctor taking an OUStringLiteral1 arg, so don't warn there:
+        if (!explicitFunctionalCastNotation) {
+            uint64_t n = res.getZExtValue();
+            if (n != 0 && n <= 127) {
+                report(
+                    DiagnosticsEngine::Warning,
+                    ("in call of %0, replace OUString constructed from an ASCII"
+                     " char constant with a string literal"),
+                    e3->getExprLoc())
+                    << qname << expr->getSourceRange();
+            }
         }
         return;
     }
@@ -1284,39 +1347,71 @@ void StringConstant::handleOUStringCtor(
         return;
     }
     //TODO: non, emb, trm
-    report(
-        DiagnosticsEngine::Warning,
-        ("in call of %0, replace OUString constructed from a string literal"
-         " directly with the string literal"),
-        e3->getExprLoc())
-        << qname << expr->getSourceRange();
-}
-
-// For places where we are calling a method with an 'const OUString&' param
-//
-void StringConstant::handleOUStringCtor2(
-    CallExpr const * expr, unsigned arg, std::string const & qname)
-{
-    auto e0 = expr->getArg(arg)->IgnoreParenImpCasts();
-    auto e1 = dyn_cast<CXXFunctionalCastExpr>(e0);
-    if (e1 == nullptr) {
-        return;
-    }
-    e0 = e1->getSubExpr()->IgnoreParenImpCasts();
-    auto e2 = dyn_cast<CXXBindTemporaryExpr>(e0);
-    if (e2 == nullptr) {
-        return;
-    }
-    auto e3 = dyn_cast<CXXConstructExpr>(
-        e2->getSubExpr()->IgnoreParenImpCasts());
-    if (e3 == nullptr) {
-        return;
-    }
-    if (e3->getNumArgs() == 1)
-    {
-        std::string s = e3->getArg(0)->getType().getAsString();
-        if (s == "sal_Unicode" || s == "char")
-            return;
+    if (rewriter != nullptr) {
+        auto loc1 = e3->getLocStart();
+        auto range = e3->getParenOrBraceRange();
+        if (loc1.isFileID() && range.getBegin().isFileID()
+            && range.getEnd().isFileID())
+        {
+            auto loc2 = range.getBegin();
+            for (bool first = true;; first = false) {
+                unsigned n = Lexer::MeasureTokenLength(
+                    loc2, compiler.getSourceManager(), compiler.getLangOpts());
+                if (!first) {
+                    StringRef s(
+                        compiler.getSourceManager().getCharacterData(loc2), n);
+                    while (s.startswith("\\\n")) {
+                        s = s.drop_front(2);
+                        while (!s.empty()
+                               && (s.front() == ' ' || s.front() == '\t'
+                                   || s.front() == '\n' || s.front() == '\v'
+                                   || s.front() == '\f'))
+                        {
+                            s = s.drop_front(1);
+                        }
+                    }
+                    if (!(s.empty() || s.startswith("/*") || s.startswith("//")
+                          || s == "\\"))
+                    {
+                        break;
+                    }
+                }
+                loc2 = loc2.getLocWithOffset(std::max<unsigned>(n, 1));
+            }
+            auto loc3 = range.getEnd();
+            for (;;) {
+                auto l = Lexer::GetBeginningOfToken(
+                    loc3.getLocWithOffset(-1), compiler.getSourceManager(),
+                    compiler.getLangOpts());
+                unsigned n = Lexer::MeasureTokenLength(
+                    l, compiler.getSourceManager(), compiler.getLangOpts());
+                StringRef s(compiler.getSourceManager().getCharacterData(l), n);
+                while (s.startswith("\\\n")) {
+                    s = s.drop_front(2);
+                    while (!s.empty()
+                           && (s.front() == ' ' || s.front() == '\t'
+                               || s.front() == '\n' || s.front() == '\v'
+                               || s.front() == '\f'))
+                    {
+                        s = s.drop_front(1);
+                    }
+                }
+                if (!(s.empty() || s.startswith("/*") || s.startswith("//")
+                      || s == "\\"))
+                {
+                    break;
+                }
+                loc3 = l;
+            }
+            if (removeText(CharSourceRange(SourceRange(loc1, loc2), false))) {
+                if (removeText(SourceRange(loc3, range.getEnd()))) {
+                    return;
+                }
+                report(DiagnosticsEngine::Fatal, "Corrupt rewrite", loc3)
+                    << expr->getSourceRange();
+                return;
+            }
+        }
     }
     report(
         DiagnosticsEngine::Warning,
commit d964a43f37056d4f478fb2c69fa1637b6a14ed26
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:29 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: Id65077d150fdb9785efeb9a2878d6ae643433b9d

diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx
index d09ddad..e7799ba 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -43,9 +43,9 @@ using namespace ::com::sun::star::beans;
 #define ROOTNODE_MENUS                                  OUString("Office.Common/Menus/")
 #define PATHDELIMITER                                   "/"
 
-#define SETNODE_NEWMENU                                 OUString("New")
-#define SETNODE_WIZARDMENU                              OUString("Wizard")
-#define SETNODE_HELPBOOKMARKS                           OUString("HelpBookmarks")
+#define SETNODE_NEWMENU                                 "New"
+#define SETNODE_WIZARDMENU                              "Wizard"
+#define SETNODE_HELPBOOKMARKS                           "HelpBookmarks"
 
 #define PROPERTYNAME_URL                                DYNAMICMENU_PROPERTYNAME_URL
 #define PROPERTYNAME_TITLE                              DYNAMICMENU_PROPERTYNAME_TITLE
commit 7d4dcb08bcf96bde0eddab14ec45cbe37eee720b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:25 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I888a2487201d6f6e9923de156bc616897b828624

diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx
index a67e7fc3..63388bc 100644
--- a/unotest/source/cpp/officeconnection.cxx
+++ b/unotest/source/cpp/officeconnection.cxx
@@ -50,7 +50,7 @@ void OfficeConnection::setUp() {
     OUString argSoffice;
     CPPUNIT_ASSERT(
         detail::getArgument(
-            OUString("soffice"),
+            "soffice",
             &argSoffice));
     if (argSoffice.match("path:")) {
         desc = "pipe,name=" + uniquePipeName("oootest");
@@ -63,7 +63,7 @@ void OfficeConnection::setUp() {
         OUString acceptArg("--accept=" + desc + ";urp");
         OUString argUser;
         CPPUNIT_ASSERT(
-            detail::getArgument(OUString("user"), &argUser));
+            detail::getArgument("user", &argUser));
         OUString userArg("-env:UserInstallation=" + toAbsoluteFileUrl(argUser));
         OUString jreArg(
             "-env:UNO_JAVA_JFW_ENV_JREHOME=true");
commit 27219b16359bc975be4cc04bf2d0ab167f30c061
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:18 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: Ib1a38d0f19ce7cab596fc32b2db0560dbeabe4ea

diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
index fdd6134..f5631c0 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -112,7 +112,7 @@ namespace toolkit
             INetURLObject aURL( i_imageURL );
             if ( aURL.GetProtocol() != INetProtocol::PrivSoffice )
             {
-                OSL_VERIFY( aURL.insertName( OUString( "hicontrast" ), false, 0 ) );
+                OSL_VERIFY( aURL.insertName( "hicontrast", false, 0 ) );
                 return aURL.GetMainURL( INetURLObject::NO_DECODE );
             }
             // the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 1cb7127..005984c 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -65,9 +65,9 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
 
-#define PROPERTY_DIALOGSOURCEURL OUString( "DialogSourceURL" )
-#define PROPERTY_IMAGEURL OUString( "ImageURL" )
-#define PROPERTY_GRAPHIC OUString( "Graphic" )
+#define PROPERTY_DIALOGSOURCEURL "DialogSourceURL"
+#define PROPERTY_IMAGEURL "ImageURL"
+#define PROPERTY_GRAPHIC "Graphic"
 
 
 // we probably will need both a hash of control models and hash of controls
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index 1c35df6..e2dda4b 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -40,15 +40,15 @@
 #define GCM_PROPERTY_ID_TAG                 8
 #define GCM_PROPERTY_ID_RESOURCERESOLVER    9
 
-#define GCM_PROPERTY_POS_X              OUString("PositionX")
-#define GCM_PROPERTY_POS_Y              OUString("PositionY")
-#define GCM_PROPERTY_WIDTH              OUString("Width")
-#define GCM_PROPERTY_HEIGHT             OUString("Height")
-#define GCM_PROPERTY_NAME               OUString("Name")
-#define GCM_PROPERTY_TABINDEX           OUString("TabIndex")
-#define GCM_PROPERTY_STEP               OUString("Step")
-#define GCM_PROPERTY_TAG                OUString("Tag")
-#define GCM_PROPERTY_RESOURCERESOLVER   OUString("ResourceResolver")
+#define GCM_PROPERTY_POS_X              "PositionX"
+#define GCM_PROPERTY_POS_Y              "PositionY"
+#define GCM_PROPERTY_WIDTH              "Width"
+#define GCM_PROPERTY_HEIGHT             "Height"
+#define GCM_PROPERTY_NAME               "Name"
+#define GCM_PROPERTY_TABINDEX           "TabIndex"
+#define GCM_PROPERTY_STEP               "Step"
+#define GCM_PROPERTY_TAG                "Tag"
+#define GCM_PROPERTY_RESOURCERESOLVER   "ResourceResolver"
 
 #define DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT
 
commit 47931f8fc3c1202509e6bbb2cd670d4defeb8967
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:14 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: Iaac8da990acdcd03858fa9187416400f0e310972

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index dfabbce..fd2b4edd 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -316,7 +316,7 @@ void WW8_WrtBookmarks::MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo)
 
 // Names of the storage streams
 #define sMainStream OUString("WordDocument")
-#define sCompObj OUString("\1CompObj")
+#define sCompObj "\1CompObj"
 
 static void WriteDop( WW8Export& rWrt )
 {
commit 84cad53d1e817492980e98b85bb938686705c7a9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:10 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: If1bbd1f0a51bf9e6ea7a737081389d28c616f3ff

diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 697d088..12ed1ba 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -58,13 +58,13 @@
 
 #define SELF_TARGET         "_self"
 #define IMAP_ALL_FILTER     OUString("<Alle>")
-#define IMAP_CERN_FILTER    OUString("MAP - CERN")
-#define IMAP_NCSA_FILTER    OUString("MAP - NCSA")
-#define IMAP_BINARY_FILTER  OUString("SIP - StarView ImageMap")
-#define IMAP_ALL_TYPE       OUString("*.*")
-#define IMAP_BINARY_TYPE    OUString("*.sip")
-#define IMAP_CERN_TYPE      OUString("*.map")
-#define IMAP_NCSA_TYPE      OUString("*.map")
+#define IMAP_CERN_FILTER    "MAP - CERN"
+#define IMAP_NCSA_FILTER    "MAP - NCSA"
+#define IMAP_BINARY_FILTER  "SIP - StarView ImageMap"
+#define IMAP_ALL_TYPE       "*.*"
+#define IMAP_BINARY_TYPE    "*.sip"
+#define IMAP_CERN_TYPE      "*.map"
+#define IMAP_NCSA_TYPE      "*.map"
 
 SFX_IMPL_MODELESSDIALOG_WITHID( SvxIMapDlgChildWindow, SID_IMAP );
 
commit 19593a8de754437c799ebf311c10f3daa70525be
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:33:05 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I5c6bc22aa034ed7d5db905ebd16ea1c7f487d203

diff --git a/smoketest/smoketest.cxx b/smoketest/smoketest.cxx
index e36e9e9..8b07098 100644
--- a/smoketest/smoketest.cxx
+++ b/smoketest/smoketest.cxx
@@ -138,7 +138,7 @@ void Test::test() {
     OUString doc;
     CPPUNIT_ASSERT(
         test::getTestArgument(
-            OUString("smoketest.doc"), &doc));
+            "smoketest.doc", &doc));
     css::uno::Sequence< css::beans::PropertyValue > args(2);
     args[0].Name = "MacroExecutionMode";
     args[0].Handle = -1;
commit 969bcb3edfac5cdadd7f090e976d873d2de7ad9f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:53 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I779395274a480a0f1f4dc9d5ea8d323bba682031

diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index ef1e058..dc383e0 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -43,7 +43,7 @@
 
 using namespace ::com::sun::star::uno;
 
-#define USERITEM_NAME OUString("UserItem")
+#define USERITEM_NAME "UserItem"
 
 SingleTabDlgImpl::SingleTabDlgImpl()
         : m_pSfxPage(NULL)
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index ce20f85..fa8db6c 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -110,7 +110,7 @@ using namespace ::cppu;
 
 #define IODLG_CONFIGNAME        OUString("FilePicker_Save")
 #define IMPGRF_CONFIGNAME       OUString("FilePicker_Graph")
-#define USERITEM_NAME           OUString("UserItem")
+#define USERITEM_NAME           "UserItem"
 
 namespace sfx2
 {
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 1ceee19..e3e38b2 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -46,7 +46,7 @@ using namespace ::com::sun::star::uno;
 
 #define VERSION 1
 #define nPixel  30L
-#define USERITEM_NAME           OUString("UserItem")
+#define USERITEM_NAME           "UserItem"
 
 namespace {
     // helper class to deactivate UpdateMode, if needed, for the life time of an instance
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 253b943..b1ab185 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -42,7 +42,7 @@
 
 using namespace ::com::sun::star::uno;
 
-#define USERITEM_NAME           OUString("UserItem")
+#define USERITEM_NAME           "UserItem"
 
 TYPEINIT1(SfxTabDialogItem,SfxSetItem);
 
commit d925b8394fdd9f6a155179ae3730bd97d20b2351
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:48 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I894bfe3ee6b932930d3088b83e4d99788f8b145a

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e1d7592..aacdf02 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -436,7 +436,7 @@ void PowerPointExport::ImplWriteBackground( FSHelperPtr pFS, Reference< XPropert
       </p:grpSpPr>"
 
 #define GETA(propName) \
-    ImplGetPropertyValue( mXPagePropSet, OUString( #propName ) )
+    ImplGetPropertyValue( mXPagePropSet, #propName )
 
 #define GET(variable, propName) \
     if ( GETA(propName) ) \
commit 729c70a2429753ea438b193de6fced88cac2b0fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:43 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: Ib023c89256d50ebe15231a96f6106f60198d362e

diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index 9bfa752..9fe6d52 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -43,7 +43,7 @@ using namespace ::sf_misc;
 #define BASPROV_PROPERTY_ID_URI         1
 #define BASPROV_PROPERTY_ID_EDITABLE    2
 
-#define BASPROV_PROPERTY_URI            OUString( "URI"  )
+#define BASPROV_PROPERTY_URI            "URI"
 #define BASPROV_PROPERTY_EDITABLE       "Editable"
 
 #define BASPROV_DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 3e5186f..ec621d2 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -47,7 +47,7 @@ namespace basprov
 {
 
 #define BASSCRIPT_PROPERTY_ID_CALLER         1
-#define BASSCRIPT_PROPERTY_CALLER            OUString( "Caller" )
+#define BASSCRIPT_PROPERTY_CALLER            "Caller"
 
 #define BASSCRIPT_DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT
 
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 75e85be..7c2dba4 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -560,7 +560,7 @@ private:
 typedef ::cppu::WeakImplHelper< XScriptListener, util::XCloseListener, lang::XInitialization, css::lang::XServiceInfo > EventListener_BASE;
 
 #define EVENTLSTNR_PROPERTY_ID_MODEL         1
-#define EVENTLSTNR_PROPERTY_MODEL            OUString( "Model"  )
+#define EVENTLSTNR_PROPERTY_MODEL            "Model"
 
 class EventListener : public EventListener_BASE
     ,public ::comphelper::OMutexAndBroadcastHelper
commit dec34f5421fd4324a395978cdb87d2cb46c66007
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:35 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I3aa16846a9d26cca60db32bd3b6de9fec8b456c1

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index ab55094..b97dabb 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -4621,11 +4621,11 @@ void Test::testFuncINDIRECT()
 void Test::testFuncINDIRECT2()
 {
     CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
-                            m_pDoc->InsertTab (0, OUString("foo")));
+                            m_pDoc->InsertTab (0, "foo"));
     CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
-                            m_pDoc->InsertTab (1, OUString("bar")));
+                            m_pDoc->InsertTab (1, "bar"));
     CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
-                            m_pDoc->InsertTab (2, OUString("baz")));
+                            m_pDoc->InsertTab (2, "baz"));
 
     ScAddress aStart;
     ScAddress aEnd;
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 22dc489..a3d36ea 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -865,7 +865,7 @@ void ScHTMLExport::WriteTables()
         }
 
         if ( bAll )
-            OUT_COMMENT( OUString("**************************************************************************") );
+            OUT_COMMENT( "**************************************************************************" );
     }
 }
 
commit f5a3a6e0e641bd0b7fd782fba2d7237ba917db6a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:28 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I9d67d5ddb9bf90e1b216a7282774543c9de874c3

diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx
index 051d9e7..4f056e1 100644
--- a/sal/qa/rtl/strings/test_oustring_compare.cxx
+++ b/sal/qa/rtl/strings/test_oustring_compare.cxx
@@ -66,12 +66,12 @@ void test::oustring::Compare::compareToIgnoreAsciiCase()
 {
     CPPUNIT_ASSERT_EQUAL(
         sal_Int32(0),
-        rtl::OUString("abc").compareToIgnoreAsciiCase(rtl::OUString("ABC")));
+        rtl::OUString("abc").compareToIgnoreAsciiCase("ABC"));
     CPPUNIT_ASSERT(
-        rtl::OUString("ABC").compareToIgnoreAsciiCase(rtl::OUString("abcdef"))
+        rtl::OUString("ABC").compareToIgnoreAsciiCase("abcdef")
         < 0);
     CPPUNIT_ASSERT(
-        rtl::OUString("A").compareToIgnoreAsciiCase(rtl::OUString("_")) > 0);
+        rtl::OUString("A").compareToIgnoreAsciiCase("_") > 0);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit de7b7e680957c86c1ece9fc9d1d0dd16089f6812
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:24 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: Ic8c87b17d0c2c1b18b01a44ababee0daccf1fb28

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index bbd2d10..1fdd49d 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -104,17 +104,17 @@ namespace oox {
 namespace drawingml {
 
 #define GETA(propName) \
-    GetProperty( rXPropSet, OUString( #propName ) )
+    GetProperty( rXPropSet, #propName )
 
 #define GETAD(propName) \
-    ( GetPropertyAndState( rXPropSet, rXPropState, OUString( #propName ), eState ) && eState == beans::PropertyState_DIRECT_VALUE )
+    ( GetPropertyAndState( rXPropSet, rXPropState, #propName, eState ) && eState == beans::PropertyState_DIRECT_VALUE )
 
 #define GET(variable, propName) \
     if ( GETA(propName) ) \
         mAny >>= variable;
 
 #define CGETAD(propName) \
-    (( bCheckDirect && GetPropertyAndState( rXPropSet, rXPropState, OUString( #propName ), eState ) && eState == beans::PropertyState_DIRECT_VALUE )||GetProperty( rXPropSet, OUString( #propName ) ))
+    (( bCheckDirect && GetPropertyAndState( rXPropSet, rXPropState, #propName, eState ) && eState == beans::PropertyState_DIRECT_VALUE )||GetProperty( rXPropSet, #propName ))
 
 // not thread safe
 int DrawingML::mnImageCounter = 1;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 8d562b1..2151839 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -123,10 +123,10 @@ bool URLTransformer::isExternalURL(const OUString& /*rURL*/) const
 }
 
 #define GETA(propName) \
-    GetProperty( rXPropSet, OUString(#propName))
+    GetProperty( rXPropSet, #propName)
 
 #define GETAD(propName) \
-    ( GetPropertyAndState( rXPropSet, rXPropState, OUString(#propName), eState ) && eState == beans::PropertyState_DIRECT_VALUE )
+    ( GetPropertyAndState( rXPropSet, rXPropState, #propName, eState ) && eState == beans::PropertyState_DIRECT_VALUE )
 
 #define GET(variable, propName) \
     if ( GETA(propName) ) \
commit c5376ef685e275f35781a99a37bdf6d13451c015
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:17 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I4633229b94be1b15dfa14eafe8d7176a1fd253c9

diff --git a/framework/inc/properties.h b/framework/inc/properties.h
index 7faa55a..5f0947d 100644
--- a/framework/inc/properties.h
+++ b/framework/inc/properties.h
@@ -100,11 +100,6 @@ namespace framework{
 #define LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE  "PreserveContentSize"
 
 #define LAYOUTMANAGER_PROPNAME_MENUBARCLOSER            LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER
-#define LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS        OUString( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS )
-#define LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY        OUString( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY )
-#define LAYOUTMANAGER_PROPNAME_HIDECURRENTUI            OUString( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI )
-#define LAYOUTMANAGER_PROPNAME_LOCKCOUNT                OUString( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT )
-#define LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE    OUString( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE )
 
 #define LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER          0
 #define LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS      1
@@ -141,18 +136,12 @@ namespace framework{
 
 #define FILTER_PROPNAME_ASCII_DOCUMENTSERVICE           "DocumentService"
 
-#define FILTER_PROPNAME_DOCUMENTSERVICE                 OUString( FILTER_PROPNAME_ASCII_DOCUMENTSERVICE )
-
 /** properties for office module config (Setup.xcu) */
 
 #define OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES   "ooSetupFactoryWindowAttributes"
 #define OFFICEFACTORY_PROPNAME_ASCII_UINAME             "ooSetupFactoryUIName"
 #define OFFICEFACTORY_PROPNAME_ASCII_ICON               "ooSetupFactoryIcon"
 
-#define OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES         OUString( OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES )
-#define OFFICEFACTORY_PROPNAME_UINAME                   OUString( OFFICEFACTORY_PROPNAME_ASCII_UINAME )
-#define OFFICEFACTORY_PROPNAME_ICON                     OUString( OFFICEFACTORY_PROPNAME_ASCII_ICON )
-
 /** properties for tab window (old) */
 #define TABWINDOW_PROPNAME_ASCII_PARENTWINDOW           "ParentWindow"
 #define TABWINDOW_PROPNAME_ASCII_TOPWINDOW              "TopWindow"
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index bbd8d95..c9aba3e 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -542,7 +542,7 @@ void TitleHelper::impl_appendModuleName (OUStringBuffer& sTitle)
 
         const OUString                 sID     = xModuleManager->identify(xOwner);
               ::comphelper::SequenceAsHashMap lProps  = xModuleManager->getByName (sID);
-        const OUString                 sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_UINAME, OUString());
+        const OUString                 sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_UINAME, OUString());
 
         // An UIname property is an optional value !
         // So please add it to the title in case it does really exists only.
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 6362b5a..99d8b56 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -196,8 +196,8 @@ bool TitleBarUpdate::implst_getModuleInfo(const css::uno::Reference< css::frame:
         rInfo.sID = xModuleManager->identify(xFrame);
         ::comphelper::SequenceAsHashMap lProps    = xModuleManager->getByName (rInfo.sID);
 
-        rInfo.sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_UINAME, OUString());
-        rInfo.nIcon   = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ICON  , INVALID_ICON_ID  );
+        rInfo.sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_UINAME, OUString());
+        rInfo.nIcon   = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_ICON  , INVALID_ICON_ID  );
 
         // Note: If we could retrieve a module id ... everything is OK.
         // UIName and Icon ID are optional values !
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 150c12a..d792838 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -148,12 +148,12 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) :
     m_aAsyncLayoutTimer.SetTimeout( 50 );
     m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) );
 
-    registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, cppu::UnoType<decltype(m_bAutomaticToolbars)>::get() );
-    registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, cppu::UnoType<decltype(m_bHideCurrentUI)>::get() );
-    registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::READONLY, &m_nLockCount, cppu::UnoType<decltype(m_nLockCount)>::get()  );
+    registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, cppu::UnoType<decltype(m_bAutomaticToolbars)>::get() );
+    registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, cppu::UnoType<decltype(m_bHideCurrentUI)>::get() );
+    registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::READONLY, &m_nLockCount, cppu::UnoType<decltype(m_nLockCount)>::get()  );
     registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloseButton, cppu::UnoType<decltype(m_bMenuBarCloseButton)>::get() );
-    registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, cppu::UnoType<decltype(bRefreshVisibility)>::get(), &bRefreshVisibility );
-    registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, cppu::UnoType<decltype(m_bPreserveContentSize)>::get() );
+    registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, cppu::UnoType<decltype(bRefreshVisibility)>::get(), &bRefreshVisibility );
+    registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, cppu::UnoType<decltype(m_bPreserveContentSize)>::get() );
 }
 
 LayoutManager::~LayoutManager()
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index a9183a8..57e572e 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1713,7 +1713,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
             xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_FILTERFACTORY, xContext),
             css::uno::UNO_QUERY_THROW);
         ::comphelper::SequenceAsHashMap lProps (xFilterCfg->getByName(sFilter));
-        OUString                 sModule = lProps.getUnpackedValueOrDefault(FILTER_PROPNAME_DOCUMENTSERVICE, OUString());
+        OUString                 sModule = lProps.getUnpackedValueOrDefault(FILTER_PROPNAME_ASCII_DOCUMENTSERVICE, OUString());
 
         // get access to the configuration of this office module
         css::uno::Reference< css::container::XNameAccess > xModuleCfg(::comphelper::ConfigurationHelper::openConfig(
@@ -1726,7 +1726,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
         // and apply it on the window.
         // Do nothing, if no configuration entry exists!
         OUString sWindowState;
-        ::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES) >>= sWindowState;
+        ::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES) >>= sWindowState;
         if (!sWindowState.isEmpty())
         {
             // SOLAR SAFE ->
commit 7bad24feed2c82bdeaf4b6e0b4c900d9e729953f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:32:10 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: Ie1e0f60a9fc78ab42d6208f28008e625d9077815

diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 85fbabb..c02725d 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -34,7 +34,7 @@
 #include "dp_identifier.hxx"
 #include "dp_update.hxx"
 
-#define USER_PACKAGE_MANAGER    OUString("user")
+#define USER_PACKAGE_MANAGER    "user"
 #define SHARED_PACKAGE_MANAGER  "shared"
 
 using namespace ::com::sun::star;
commit 8b037a1ed1032e76f69a91b1cbfdbf9852262e3c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:31:59 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I042d922e31d6feeb5d4b4fbc542826a386fb2fbd

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 3dd15b07..4b36b14 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -51,7 +51,7 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
 using namespace comphelper;
 
-#define CFG_PAGE_AND_GROUP          OUString("General"), OUString("LoadSave")
+#define CFG_PAGE_AND_GROUP          "General", "LoadSave"
 
 
 
commit 5b8de53a3f8a68d1eb6157398f5c5e456054028e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 6 12:31:54 2015 +0100

    loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
    
    Change-Id: I409ea5a7e4b6a8e2886d5b489b66b217b3be58b6

diff --git a/configmgr/qa/unit/test.cxx b/configmgr/qa/unit/test.cxx
index d31dd94..fd8fac1 100644
--- a/configmgr/qa/unit/test.cxx
+++ b/configmgr/qa/unit/test.cxx
@@ -222,8 +222,8 @@ void Test::testKeyFetch()
     OUString s;
     CPPUNIT_ASSERT(
         getKey(
-            OUString("/org.openoffice.System"),
-            OUString("L10N/Locale")) >>=
+            "/org.openoffice.System",
+            "L10N/Locale") >>=
         s);
 }
 
@@ -236,8 +236,8 @@ void Test::testKeySet()
     OUString s;
     CPPUNIT_ASSERT(
         getKey(
-            OUString("/org.openoffice.System/L10N"),
-            OUString("Locale")) >>=
+            "/org.openoffice.System/L10N",
+            "Locale") >>=
         s);
     CPPUNIT_ASSERT( s == "com.sun.star.configuration.backend.LocaleBackend UILocale" );
 }
@@ -251,8 +251,8 @@ void Test::testKeyReset()
         OUString s;
         CPPUNIT_ASSERT(
             getKey(
-                OUString("/org.openoffice.System/L10N"),
-                OUString("Locale")) >>=
+                "/org.openoffice.System/L10N",
+                "Locale") >>=
             s);
         CPPUNIT_ASSERT( s == "com.sun.star.configuration.backend.LocaleBackend Locale" );
     }
@@ -263,9 +263,9 @@ void Test::testSetSetMemberName()
     OUString s;
     CPPUNIT_ASSERT(
         getKey(
-            OUString("/org.openoffice.Office.UI.GenericCommands/UserInterface/Commands/"
-                     ".uno:FontworkShapeType"),
-            OUString("Label")) >>=
+            "/org.openoffice.Office.UI.GenericCommands/UserInterface/Commands/"
+                     ".uno:FontworkShapeType",
+            "Label") >>=
         s);
     CPPUNIT_ASSERT( s == "Fontwork Shape" );
 
@@ -285,9 +285,9 @@ void Test::testSetSetMemberName()
 
     CPPUNIT_ASSERT(
         getKey(
-            OUString("/org.openoffice.Office.UI.GenericCommands/UserInterface/Commands/"
-                    ".uno:FontworkShapeType"),
-            OUString("Label")) >>=
+            "/org.openoffice.Office.UI.GenericCommands/UserInterface/Commands/"
+                    ".uno:FontworkShapeType",
+            "Label") >>=
         s);
     CPPUNIT_ASSERT( s == "Fontwork Gallery..." );
 }


More information about the Libreoffice-commits mailing list