summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-06 10:55:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-13 08:16:03 +0200
commit3457da6abe0fd03efd19442e9790fbd1aa04c160 (patch)
treea7a2d5b51839b200e7cda79af863dce7a04d3a10 /extensions
parent47196637a41ddfc9a8707771b1b9f482fd72c3b6 (diff)
loplugin:stringstatic also look for local statics
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/bibmod.cxx21
-rw-r--r--extensions/source/bibliography/bibprop.hxx20
-rw-r--r--extensions/source/bibliography/datman.cxx6
-rw-r--r--extensions/source/logging/csvformatter.cxx2
4 files changed, 22 insertions, 27 deletions
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
index 3e2cd829c32e..91db4921f957 100644
--- a/extensions/source/bibliography/bibmod.cxx
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -89,16 +89,15 @@ BibConfig* BibModul::GetConfig()
// PropertyNames
-#define STATIC_USTRING(a,b) const OUString a(b)
-STATIC_USTRING(FM_PROP_LABEL,"Label");
-STATIC_USTRING(FM_PROP_CONTROLSOURCE,"DataField");
-STATIC_USTRING(FM_PROP_NAME,"Name");
-STATIC_USTRING(FM_PROP_FORMATKEY,"FormatKey");
-STATIC_USTRING(FM_PROP_EDITMODE,"RecordMode");
-STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,"DataSelectionType");
-STATIC_USTRING(FM_PROP_CURSORSOURCE,"DataSelection");
-STATIC_USTRING(FM_PROP_DATASOURCE, "DataSource");
-STATIC_USTRING(FM_PROP_VALUE,"Value");
-STATIC_USTRING(FM_PROP_TEXT,"Text");
+const OUStringLiteral FM_PROP_LABEL = "Label";
+const OUStringLiteral FM_PROP_CONTROLSOURCE = "DataField";
+const OUStringLiteral FM_PROP_NAME = "Name";
+const OUStringLiteral FM_PROP_FORMATKEY = "FormatKey";
+const OUStringLiteral FM_PROP_EDITMODE = "RecordMode";
+const OUStringLiteral FM_PROP_CURSORSOURCETYPE = "DataSelectionType";
+const OUStringLiteral FM_PROP_CURSORSOURCE = "DataSelection";
+const OUStringLiteral FM_PROP_DATASOURCE = "DataSource";
+const OUStringLiteral FM_PROP_VALUE = "Value";
+const OUStringLiteral FM_PROP_TEXT = "Text";
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/bibliography/bibprop.hxx b/extensions/source/bibliography/bibprop.hxx
index 85ba484d6ac9..327ae8ddc7f2 100644
--- a/extensions/source/bibliography/bibprop.hxx
+++ b/extensions/source/bibliography/bibprop.hxx
@@ -21,16 +21,16 @@
#include <rtl/ustring.hxx>
-extern const OUString FM_PROP_LABEL;
-extern const OUString FM_PROP_NAME;
-extern const OUString FM_PROP_CONTROLSOURCE;
-extern const OUString FM_PROP_FORMATKEY;
-extern const OUString FM_PROP_VALUE;
-extern const OUString FM_PROP_EDITMODE;
-extern const OUString FM_PROP_DATASOURCE;
-extern const OUString FM_PROP_CURSORSOURCE;
-extern const OUString FM_PROP_CURSORSOURCETYPE;
-extern const OUString FM_PROP_TEXT;
+extern const OUStringLiteral FM_PROP_LABEL;
+extern const OUStringLiteral FM_PROP_NAME;
+extern const OUStringLiteral FM_PROP_CONTROLSOURCE;
+extern const OUStringLiteral FM_PROP_FORMATKEY;
+extern const OUStringLiteral FM_PROP_VALUE;
+extern const OUStringLiteral FM_PROP_EDITMODE;
+extern const OUStringLiteral FM_PROP_DATASOURCE;
+extern const OUStringLiteral FM_PROP_CURSORSOURCE;
+extern const OUStringLiteral FM_PROP_CURSORSOURCETYPE;
+extern const OUStringLiteral FM_PROP_TEXT;
#endif
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 99aeabe4de7d..c5115703dbf9 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -520,11 +520,7 @@ void SAL_CALL BibInterceptorHelper::setMasterDispatchProvider( const css::uno::R
}
-OUString const gGridName("theGrid");
-OUString const gViewName("theView");
-OUString const gGlobalName("theGlobals");
-OUString const gBeamerSize("theBeamerSize");
-OUString const gViewSize("theViewSize");
+OUStringLiteral const gGridName("theGrid");
BibDataManager::BibDataManager()
:BibDataManager_Base( GetMutex() )
diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx
index 9ab747ad504d..0805d68b43fe 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -88,7 +88,7 @@ namespace
{
const sal_Unicode quote_char = '"';
const sal_Unicode comma_char = ',';
- const OUString dos_newline = "\r\n";
+ const OUStringLiteral dos_newline = "\r\n";
bool needsQuoting(const OUString& str)
{