LibreOffice Module unotools (master)
1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
g
i
k
l
m
n
o
p
r
s
t
u
w
Functions
a
c
d
e
g
i
k
l
m
n
o
r
s
t
u
w
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
z
~
Variables
a
b
c
d
e
i
m
n
p
r
s
t
u
w
x
Typedefs
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
Functions
a
c
e
g
i
l
m
p
r
s
t
u
Variables
a
b
d
f
g
i
m
n
o
p
r
s
t
u
v
x
Typedefs
Enumerations
Macros
c
f
m
p
r
s
u
unotools
source
misc
defaultencoding.cxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*/
9
10
#include <
sal/config.h
>
11
12
#include <
unotools/configmgr.hxx
>
13
#include <
unotools/defaultencoding.hxx
>
14
#include <officecfg/Office/Linguistic.hxx>
15
#include <officecfg/Setup.hxx>
16
#include <officecfg/System.hxx>
17
18
OUString
utl_getLocaleForGlobalDefaultEncoding
()
19
{
20
if
(
utl::ConfigManager::IsFuzzing
())
21
return
"en-US"
;
22
// First try document default language
23
OUString
result
(
officecfg::Office::Linguistic::General::DefaultLocale::get
());
24
// Fallback to LO locale
25
if
(
result
.isEmpty())
26
result
=
officecfg::Setup::L10N::ooSetupSystemLocale::get
();
27
// Fallback to system locale
28
if
(
result
.isEmpty())
29
result
=
officecfg::System::L10N::Locale::get
();
30
return
result
;
31
}
32
33
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
utl::ConfigManager::IsFuzzing
static bool IsFuzzing()
Definition:
configmgr.cxx:181
config.h
configmgr.hxx
utl_getLocaleForGlobalDefaultEncoding
OUString utl_getLocaleForGlobalDefaultEncoding()
Determines which locale should be used by default in filters when importing non-unicode strings.
Definition:
defaultencoding.cxx:18
defaultencoding.hxx
Translate::get
OUString get(TranslateId sContextAndId, const std::locale &loc)
Definition:
resmgr.cxx:211
result
Any result
Definition:
ucblockbytes.cxx:239
Generated on Sun Jul 30 2023 04:29:25 for LibreOffice Module unotools (master) by
1.9.3