summaryrefslogtreecommitdiff
path: root/linguistic/source/dicimp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 08:46:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 09:57:15 +0100
commit933660e591211f06a1be43e83c64ad1e8529bc2f (patch)
treeadc0ede7c30c9ee5af7b75e649c806831f73da41 /linguistic/source/dicimp.cxx
parentb9c9c70157e7bc5b868437ab6bda2b21ba34c627 (diff)
loplugin:stringconstant look for unnecessary OString constructor use
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic/source/dicimp.cxx')
-rw-r--r--linguistic/source/dicimp.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 8c4fe534d1be..100c9cab7f06 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -431,7 +431,7 @@ ErrCode DictionaryNeo::saveEntries(const OUString &rURL)
// Always write as the latest version, i.e. DIC_VERSION_7
rtl_TextEncoding eEnc = RTL_TEXTENCODING_UTF8;
- pStream->WriteLine(OString(pVerOOo7));
+ pStream->WriteLine(pVerOOo7);
ErrCode nErr = pStream->GetError();
if (nErr != ERRCODE_NONE)
return nErr;
@@ -439,7 +439,7 @@ ErrCode DictionaryNeo::saveEntries(const OUString &rURL)
* undetermined or multiple? Earlier versions did not know about 'und' and
* 'mul' and 'zxx' codes. Sync with ReadDicVersion() */
if (LinguIsUnspecified(nLanguage))
- pStream->WriteLine(OString("lang: <none>"));
+ pStream->WriteLine("lang: <none>");
else
{
OStringBuffer aLine("lang: ");
@@ -449,9 +449,9 @@ ErrCode DictionaryNeo::saveEntries(const OUString &rURL)
if (ERRCODE_NONE != (nErr = pStream->GetError()))
return nErr;
if (eDicType == DictionaryType_POSITIVE)
- pStream->WriteLine(OString("type: positive"));
+ pStream->WriteLine("type: positive");
else
- pStream->WriteLine(OString("type: negative"));
+ pStream->WriteLine("type: negative");
if (aDicName.endsWith(EXTENSION_FOR_TITLE_TEXT))
{
pStream->WriteLine(OUStringToOString("title: " +
@@ -460,7 +460,7 @@ ErrCode DictionaryNeo::saveEntries(const OUString &rURL)
}
if (ERRCODE_NONE != (nErr = pStream->GetError()))
return nErr;
- pStream->WriteLine(OString("---"));
+ pStream->WriteLine("---");
if (ERRCODE_NONE != (nErr = pStream->GetError()))
return nErr;
for (Reference<XDictionaryEntry> & aEntrie : aEntries)