summaryrefslogtreecommitdiff
path: root/lingucomponent/source
diff options
context:
space:
mode:
authorCollabora <l.lunak@collabora.com>2021-07-15 12:18:49 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-07-23 10:32:08 +0200
commit2d04d7cc559445d8c1559af6af6d981d9f682db4 (patch)
tree8f9ed81590800f772f162f93473c654f4eefb468 /lingucomponent/source
parenta470d97f2ddcb3607ae9d1df871a59f04d823564 (diff)
do not use "using namespace std" in headers
It's a bad style, doing that in headers can affect many source files (especially with PCH used). Change-Id: Ic9091a1d018e74606c9fa95df71a55faaa93d4ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119011 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'lingucomponent/source')
-rw-r--r--lingucomponent/source/languageguessing/guess.hxx10
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx1
-rw-r--r--lingucomponent/source/languageguessing/simpleguesser.hxx18
3 files changed, 13 insertions, 16 deletions
diff --git a/lingucomponent/source/languageguessing/guess.hxx b/lingucomponent/source/languageguessing/guess.hxx
index e68d852a53a6..627033d3ab7f 100644
--- a/lingucomponent/source/languageguessing/guess.hxx
+++ b/lingucomponent/source/languageguessing/guess.hxx
@@ -28,8 +28,6 @@
#include <string>
-using namespace std;
-
class Guess final {
public:
@@ -43,12 +41,12 @@ class Guess final {
*/
Guess(const char * guess_str);
- const string& GetLanguage() const { return language_str;}
- const string& GetCountry() const { return country_str;}
+ const std::string& GetLanguage() const { return language_str;}
+ const std::string& GetCountry() const { return country_str;}
private:
- string language_str;
- string country_str;
+ std::string language_str;
+ std::string country_str;
};
#endif
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index f04e0b3956d5..dfece0efe4e5 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -46,6 +46,7 @@
#include <textcat.h>
#endif
+using namespace ::std;
using namespace ::osl;
using namespace ::cppu;
using namespace ::com::sun::star;
diff --git a/lingucomponent/source/languageguessing/simpleguesser.hxx b/lingucomponent/source/languageguessing/simpleguesser.hxx
index ac9ef7a3a3a7..d6b88d1d67b9 100644
--- a/lingucomponent/source/languageguessing/simpleguesser.hxx
+++ b/lingucomponent/source/languageguessing/simpleguesser.hxx
@@ -27,8 +27,6 @@
#define MAX_STRING_LENGTH_TO_ANALYSE 200
-using namespace std;
-
class SimpleGuesser final
{
public:
@@ -50,7 +48,7 @@ public:
* @param char* text is the text to analyze
* @return the list of guess
*/
- vector<Guess> GuessLanguage(const char* text);
+ std::vector<Guess> GuessLanguage(const char* text);
/**
* Analyze a text and return the most probable language of the text
@@ -63,31 +61,31 @@ public:
* List all available languages (possibly to be in guesses)
* @return the list of languages
*/
- vector<Guess> GetAvailableLanguages();
+ std::vector<Guess> GetAvailableLanguages();
/**
* List all languages (possibly in guesses or not)
* @return the list of languages
*/
- vector<Guess> GetAllManagedLanguages();
+ std::vector<Guess> GetAllManagedLanguages();
/**
* List all Unavailable languages (disable for any reason)
* @return the list of languages
*/
- vector<Guess> GetUnavailableLanguages();
+ std::vector<Guess> GetUnavailableLanguages();
/**
* Mark a language enabled
* @param string lang the language to enable (build like language-COUNTRY-encoding)
*/
- void EnableLanguage(const string& lang);
+ void EnableLanguage(const std::string& lang);
/**
* Mark a language disabled
* @param string lang the language to disable (build like language-COUNTRY-encoding)
*/
- void DisableLanguage(const string& lang);
+ void DisableLanguage(const std::string& lang);
/**
* Load a new DB of fingerprints
@@ -101,10 +99,10 @@ private:
void* h;
//Is used to select languages into the fingerprints DB, the mask is used to indicate if we want enabled disabled or both
- vector<Guess> GetManagedLanguages(const char mask);
+ std::vector<Guess> GetManagedLanguages(const char mask);
//Like getManagedLanguages, this function enable or disable a language and it depends of the mask
- void XableLanguage(const string& lang, char mask);
+ void XableLanguage(const std::string& lang, char mask);
};
#endif