summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-07-30 17:56:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-07-31 12:59:58 +0200
commit74f6acf030a6289eb5a9635e1e9e1afd59aa4b90 (patch)
treee260d7d4e9872e0f4745de145626d4b1b4c5cae2 /cui
parenta324b1ca1ae6185ea39db6daf68c7210b541ae96 (diff)
Improved loplugin:stringconstant (now that GCC 7 supports it): cui
Change-Id: If2a86e570cd8225acb27e9c37377078b7a246449 Reviewed-on: https://gerrit.libreoffice.org/76687 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/CustomNotebookbarGenerator.cxx16
-rw-r--r--cui/source/customize/SvxConfigPageHelper.cxx24
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx10
-rw-r--r--cui/source/dialogs/colorpicker.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx4
-rw-r--r--cui/source/options/connpoolconfig.cxx12
6 files changed, 34 insertions, 34 deletions
diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx
index f08e6b49fdfe..57efc2776d18 100644
--- a/cui/source/customize/CustomNotebookbarGenerator.cxx
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -42,16 +42,16 @@ static OUString lcl_activeAppName(vcl::EnumContext::Application eApp)
switch (eApp)
{
case vcl::EnumContext::Application::Writer:
- return OUString("ActiveWriter");
+ return "ActiveWriter";
break;
case vcl::EnumContext::Application::Calc:
- return OUString("ActiveCalc");
+ return "ActiveCalc";
break;
case vcl::EnumContext::Application::Impress:
- return OUString("ActiveImpress");
+ return "ActiveImpress";
break;
case vcl::EnumContext::Application::Draw:
- return OUString("ActiveDraw");
+ return "ActiveDraw";
break;
default:
return OUString();
@@ -64,16 +64,16 @@ static OUString lcl_getAppName(vcl::EnumContext::Application eApp)
switch (eApp)
{
case vcl::EnumContext::Application::Writer:
- return OUString("Writer");
+ return "Writer";
break;
case vcl::EnumContext::Application::Calc:
- return OUString("Calc");
+ return "Calc";
break;
case vcl::EnumContext::Application::Impress:
- return OUString("Impress");
+ return "Impress";
break;
case vcl::EnumContext::Application::Draw:
- return OUString("Draw");
+ return "Draw";
break;
default:
return OUString();
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx
index b0221ca675ef..10d2beb8fa55 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -226,29 +226,29 @@ OUString SvxConfigPageHelper::GetModuleName( const OUString& aModuleId )
{
if ( aModuleId == "com.sun.star.text.TextDocument" ||
aModuleId == "com.sun.star.text.GlobalDocument" )
- return OUString("Writer");
+ return "Writer";
else if ( aModuleId == "com.sun.star.text.WebDocument" )
- return OUString("Writer/Web");
+ return "Writer/Web";
else if ( aModuleId == "com.sun.star.drawing.DrawingDocument" )
- return OUString("Draw");
+ return "Draw";
else if ( aModuleId == "com.sun.star.presentation.PresentationDocument" )
- return OUString("Impress");
+ return "Impress";
else if ( aModuleId == "com.sun.star.sheet.SpreadsheetDocument" )
- return OUString("Calc");
+ return "Calc";
else if ( aModuleId == "com.sun.star.script.BasicIDE" )
- return OUString("Basic");
+ return "Basic";
else if ( aModuleId == "com.sun.star.formula.FormulaProperties" )
- return OUString("Math");
+ return "Math";
else if ( aModuleId == "com.sun.star.sdb.RelationDesign" )
- return OUString("Relation Design");
+ return "Relation Design";
else if ( aModuleId == "com.sun.star.sdb.QueryDesign" )
- return OUString("Query Design");
+ return "Query Design";
else if ( aModuleId == "com.sun.star.sdb.TableDesign" )
- return OUString("Table Design");
+ return "Table Design";
else if ( aModuleId == "com.sun.star.sdb.DataSourceBrowser" )
- return OUString("Data Source Browser" );
+ return "Data Source Browser";
else if ( aModuleId == "com.sun.star.sdb.DatabaseDocument" )
- return OUString("Database" );
+ return "Database";
return OUString();
}
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index c9fbb52d36e9..40d26bada76d 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -88,15 +88,15 @@ static OUString getFileName(const OUString& aFileName)
static OUString getModuleId(const OUString& sModuleName)
{
if (sModuleName == "Writer")
- return OUString("com.sun.star.text.TextDocument");
+ return "com.sun.star.text.TextDocument";
else if (sModuleName == "Draw")
- return OUString("com.sun.star.drawing.DrawingDocument");
+ return "com.sun.star.drawing.DrawingDocument";
else if (sModuleName == "Impress")
- return OUString("com.sun.star.presentation.PresentationDocument");
+ return "com.sun.star.presentation.PresentationDocument";
else if (sModuleName == "Calc")
- return OUString("com.sun.star.sheet.SpreadsheetDocument");
+ return "com.sun.star.sheet.SpreadsheetDocument";
else
- return OUString("None");
+ return "None";
}
SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(TabPageParent pParent, const SfxItemSet& rSet)
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 6b7142f2a85b..e96037e747df 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1209,7 +1209,7 @@ private:
OUString ColorPicker_getImplementationName()
{
- return OUString( "com.sun.star.cui.ColorPicker" );
+ return "com.sun.star.cui.ColorPicker";
}
Reference< XInterface > ColorPicker_createInstance( Reference< XComponentContext > const & )
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index a2bae6bd1ce2..4867a43bbe00 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -287,8 +287,8 @@ void SvxHyperlinkInternetTp::RemoveImproperProtocol(const OUString& aProperSchem
OUString SvxHyperlinkInternetTp::GetSchemeFromButtons() const
{
if( m_xRbtLinktypFTP->get_active() )
- return OUString(INET_FTP_SCHEME);
- return OUString(INET_HTTP_SCHEME);
+ return INET_FTP_SCHEME;
+ return INET_HTTP_SCHEME;
}
INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const
diff --git a/cui/source/options/connpoolconfig.cxx b/cui/source/options/connpoolconfig.cxx
index 8155770129b1..3b42fc1fdd69 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -40,37 +40,37 @@ namespace offapp
static OUString getConnectionPoolNodeName()
{
- return OUString("org.openoffice.Office.DataAccess/ConnectionPool" );
+ return "org.openoffice.Office.DataAccess/ConnectionPool";
}
static OUString getEnablePoolingNodeName()
{
- return OUString("EnablePooling");
+ return "EnablePooling";
}
static OUString getDriverSettingsNodeName()
{
- return OUString("DriverSettings");
+ return "DriverSettings";
}
static OUString getDriverNameNodeName()
{
- return OUString("DriverName");
+ return "DriverName";
}
static OUString getEnableNodeName()
{
- return OUString("Enable");
+ return "Enable";
}
static OUString getTimeoutNodeName()
{
- return OUString("Timeout");
+ return "Timeout";
}
void ConnectionPoolConfig::GetOptions(SfxItemSet& _rFillItems)