[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - comphelper/inc comphelper/source vcl/unx
Herbert Dürr
hdu at apache.org
Tue Dec 17 22:07:57 PST 2013
comphelper/inc/comphelper/locale.hxx | 70 +++++++++++++++++------------------
comphelper/source/misc/locale.cxx | 70 +++++++++++++++++------------------
vcl/unx/generic/app/i18n_xkb.cxx | 2 -
3 files changed, 71 insertions(+), 71 deletions(-)
New commits:
commit 6f80044bc6371f22051f31628ecca7ee28695de3
Author: Herbert Dürr <hdu at apache.org>
Date: Wed Dec 18 05:49:02 2013 +0000
#i123859# avoid incomplete Locale class as return value
Some static Locale methods used the Locale class as return value type while it was
still incompletely defined. Most compilers allow this, but in general C++ doesn't
require them to do so. Using a const reference as return value solves this, improves
the C++ compliance and avoids unneeded copy constructions.
diff --git a/comphelper/inc/comphelper/locale.hxx b/comphelper/inc/comphelper/locale.hxx
index 5bc9d8a..e227720 100644
--- a/comphelper/inc/comphelper/locale.hxx
+++ b/comphelper/inc/comphelper/locale.hxx
@@ -64,41 +64,41 @@ class COMPHELPER_DLLPUBLIC Locale
static const sal_Unicode SEPERATOR_CV_LINUX;
/** @short some predefined Locale objects. */
- static const Locale EN_US();
- static const Locale EN();
- static const Locale DE_DE();
- static const Locale DE_CH();
- static const Locale DE_AT();
- static const Locale AR();
- static const Locale CA();
- static const Locale CS();
- static const Locale DA();
- static const Locale EL();
- static const Locale ES();
- static const Locale FI();
- static const Locale FR();
- static const Locale HE();
- static const Locale HI_IN();
- static const Locale HU();
- static const Locale IT();
- static const Locale JA();
- static const Locale KO();
- static const Locale NL();
- static const Locale PL();
- static const Locale PT();
- static const Locale PT_BR();
- static const Locale RU();
- static const Locale SK();
- static const Locale SL();
- static const Locale SV();
- static const Locale TH();
- static const Locale TR();
- static const Locale X_DEFAULT();
- static const Locale X_COMMENT();
- static const Locale X_TRANSLATE();
- static const Locale X_NOTRANSLATE();
- static const Locale ZH_CN();
- static const Locale ZH_TW();
+ static const Locale& EN_US();
+ static const Locale& EN();
+ static const Locale& DE_DE();
+ static const Locale& DE_CH();
+ static const Locale& DE_AT();
+ static const Locale& AR();
+ static const Locale& CA();
+ static const Locale& CS();
+ static const Locale& DA();
+ static const Locale& EL();
+ static const Locale& ES();
+ static const Locale& FI();
+ static const Locale& FR();
+ static const Locale& HE();
+ static const Locale& HI_IN();
+ static const Locale& HU();
+ static const Locale& IT();
+ static const Locale& JA();
+ static const Locale& KO();
+ static const Locale& NL();
+ static const Locale& PL();
+ static const Locale& PT();
+ static const Locale& PT_BR();
+ static const Locale& RU();
+ static const Locale& SK();
+ static const Locale& SL();
+ static const Locale& SV();
+ static const Locale& TH();
+ static const Locale& TR();
+ static const Locale& X_DEFAULT();
+ static const Locale& X_COMMENT();
+ static const Locale& X_TRANSLATE();
+ static const Locale& X_NOTRANSLATE();
+ static const Locale& ZH_CN();
+ static const Locale& ZH_TW();
//-------------------------------------------
// types
diff --git a/comphelper/source/misc/locale.cxx b/comphelper/source/misc/locale.cxx
index 301a430..bb98277 100644
--- a/comphelper/source/misc/locale.cxx
+++ b/comphelper/source/misc/locale.cxx
@@ -40,7 +40,7 @@ const sal_Unicode Locale::SEPERATOR_CV = (sal_Unicode)'_';
const sal_Unicode Locale::SEPERATOR_CV_LINUX = (sal_Unicode)'.';
//-----------------------------------------------
-const Locale Locale::X_DEFAULT()
+const Locale& Locale::X_DEFAULT()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("x"),
@@ -49,7 +49,7 @@ const Locale Locale::X_DEFAULT()
}
//-----------------------------------------------
-const Locale Locale::EN()
+const Locale& Locale::EN()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("en"),
@@ -58,7 +58,7 @@ const Locale Locale::EN()
}
//-----------------------------------------------
-const Locale Locale::EN_US()
+const Locale& Locale::EN_US()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("en"),
@@ -67,7 +67,7 @@ const Locale Locale::EN_US()
}
//-----------------------------------------------
-const Locale Locale::DE_DE()
+const Locale& Locale::DE_DE()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("de"),
@@ -76,7 +76,7 @@ const Locale Locale::DE_DE()
}
//-----------------------------------------------
-const Locale Locale::DE_CH()
+const Locale& Locale::DE_CH()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("de"),
@@ -85,7 +85,7 @@ const Locale Locale::DE_CH()
}
//-----------------------------------------------
-const Locale Locale::DE_AT()
+const Locale& Locale::DE_AT()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("de"),
@@ -94,7 +94,7 @@ const Locale Locale::DE_AT()
}
//-----------------------------------------------
-const Locale Locale::AR()
+const Locale& Locale::AR()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("ar"),
@@ -103,7 +103,7 @@ const Locale Locale::AR()
}
//-----------------------------------------------
-const Locale Locale::CA()
+const Locale& Locale::CA()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("ca"),
@@ -112,7 +112,7 @@ const Locale Locale::CA()
}
//-----------------------------------------------
-const Locale Locale::CS()
+const Locale& Locale::CS()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("cs"),
@@ -121,7 +121,7 @@ const Locale Locale::CS()
}
//-----------------------------------------------
-const Locale Locale::DA()
+const Locale& Locale::DA()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("da"),
@@ -130,7 +130,7 @@ const Locale Locale::DA()
}
//-----------------------------------------------
-const Locale Locale::EL()
+const Locale& Locale::EL()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("el"),
@@ -139,7 +139,7 @@ const Locale Locale::EL()
}
//-----------------------------------------------
-const Locale Locale::ES()
+const Locale& Locale::ES()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("es"),
@@ -148,7 +148,7 @@ const Locale Locale::ES()
}
//-----------------------------------------------
-const Locale Locale::FI()
+const Locale& Locale::FI()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("fi"),
@@ -157,7 +157,7 @@ const Locale Locale::FI()
}
//-----------------------------------------------
-const Locale Locale::FR()
+const Locale& Locale::FR()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("fr"),
@@ -166,7 +166,7 @@ const Locale Locale::FR()
}
//-----------------------------------------------
-const Locale Locale::HE()
+const Locale& Locale::HE()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("he"),
@@ -175,7 +175,7 @@ const Locale Locale::HE()
}
//-----------------------------------------------
-const Locale Locale::HI_IN()
+const Locale& Locale::HI_IN()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("hi"),
@@ -184,7 +184,7 @@ const Locale Locale::HI_IN()
}
//-----------------------------------------------
-const Locale Locale::HU()
+const Locale& Locale::HU()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("hu"),
@@ -193,7 +193,7 @@ const Locale Locale::HU()
}
//-----------------------------------------------
-const Locale Locale::IT()
+const Locale& Locale::IT()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("it"),
@@ -202,7 +202,7 @@ const Locale Locale::IT()
}
//-----------------------------------------------
-const Locale Locale::JA()
+const Locale& Locale::JA()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("ja"),
@@ -211,7 +211,7 @@ const Locale Locale::JA()
}
//-----------------------------------------------
-const Locale Locale::KO()
+const Locale& Locale::KO()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("ko"),
@@ -220,7 +220,7 @@ const Locale Locale::KO()
}
//-----------------------------------------------
-const Locale Locale::NL()
+const Locale& Locale::NL()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("nl"),
@@ -229,7 +229,7 @@ const Locale Locale::NL()
}
//-----------------------------------------------
-const Locale Locale::PL()
+const Locale& Locale::PL()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("pl"),
@@ -238,7 +238,7 @@ const Locale Locale::PL()
}
//-----------------------------------------------
-const Locale Locale::PT()
+const Locale& Locale::PT()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("pt"),
@@ -247,7 +247,7 @@ const Locale Locale::PT()
}
//-----------------------------------------------
-const Locale Locale::PT_BR()
+const Locale& Locale::PT_BR()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("pt"),
@@ -256,7 +256,7 @@ const Locale Locale::PT_BR()
}
//-----------------------------------------------
-const Locale Locale::RU()
+const Locale& Locale::RU()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("ru"),
@@ -265,7 +265,7 @@ const Locale Locale::RU()
}
//-----------------------------------------------
-const Locale Locale::SK()
+const Locale& Locale::SK()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("sk"),
@@ -274,7 +274,7 @@ const Locale Locale::SK()
}
//-----------------------------------------------
-const Locale Locale::SL()
+const Locale& Locale::SL()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("sl"),
@@ -283,7 +283,7 @@ const Locale Locale::SL()
}
//-----------------------------------------------
-const Locale Locale::SV()
+const Locale& Locale::SV()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("sv"),
@@ -292,7 +292,7 @@ const Locale Locale::SV()
}
//-----------------------------------------------
-const Locale Locale::TH()
+const Locale& Locale::TH()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("th"),
@@ -301,7 +301,7 @@ const Locale Locale::TH()
}
//-----------------------------------------------
-const Locale Locale::TR()
+const Locale& Locale::TR()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("tr"),
@@ -310,7 +310,7 @@ const Locale Locale::TR()
}
//-----------------------------------------------
-const Locale Locale::X_COMMENT()
+const Locale& Locale::X_COMMENT()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("x"),
@@ -319,7 +319,7 @@ const Locale Locale::X_COMMENT()
}
//-----------------------------------------------
-const Locale Locale::X_TRANSLATE()
+const Locale& Locale::X_TRANSLATE()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("x"),
@@ -328,7 +328,7 @@ const Locale Locale::X_TRANSLATE()
}
//-----------------------------------------------
-const Locale Locale::X_NOTRANSLATE()
+const Locale& Locale::X_NOTRANSLATE()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("x"),
@@ -337,7 +337,7 @@ const Locale Locale::X_NOTRANSLATE()
}
//-----------------------------------------------
-const Locale Locale::ZH_CN()
+const Locale& Locale::ZH_CN()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("zh"),
@@ -346,7 +346,7 @@ const Locale Locale::ZH_CN()
}
//-----------------------------------------------
-const Locale Locale::ZH_TW()
+const Locale& Locale::ZH_TW()
{
static Locale aLocale(
::rtl::OUString::createFromAscii("zh"),
commit 53e91e8867652a344f00e9badfe65023a395cbc6
Author: Herbert Dürr <hdu at apache.org>
Date: Wed Dec 18 05:25:32 2013 +0000
#i123865# fix typo in i18n_xkb's constructor
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index 951eb88..270010f 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -32,7 +32,7 @@
#include "unx/i18n_xkb.hxx"
SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay)
-: mbUseExtension( true ),
+: mbUseExtension( true )
, mnDefaultGroup( 0 )
{
mpDisplay = pDisplay;
More information about the Libreoffice-commits
mailing list