LibreOffice Module svtools (master)
1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
Functions
a
d
e
g
i
l
o
s
u
w
Variables
Typedefs
Enumerations
Enumerator
a
b
c
d
f
g
h
l
o
q
r
s
t
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
h
l
m
n
o
p
s
t
u
w
x
Typedefs
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
c
d
f
g
i
l
m
o
s
t
u
Variables
a
b
c
d
e
f
g
h
j
m
n
p
r
s
t
w
x
Typedefs
Enumerations
Enumerator
r
s
t
v
Macros
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Examples
svtools
source
control
indexentryres.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
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
21
#include <
svtools/svtresid.hxx
>
22
#include <svtools/strings.hrc>
23
#include <
svtools/indexentryres.hxx
>
24
25
// implementation of the indexentry-algorithm-name translation
26
IndexEntryResource::IndexEntryResource
()
27
{
28
m_aData
.emplace_back(
"alphanumeric"
,
SvtResId
(STR_SVT_INDEXENTRY_ALPHANUMERIC));
29
m_aData
.emplace_back(
"dict"
,
SvtResId
(STR_SVT_INDEXENTRY_DICTIONARY));
30
m_aData
.emplace_back(
"pinyin"
,
SvtResId
(STR_SVT_INDEXENTRY_PINYIN));
31
m_aData
.emplace_back(
"radical"
,
SvtResId
(STR_SVT_INDEXENTRY_RADICAL));
32
m_aData
.emplace_back(
"stroke"
,
SvtResId
(STR_SVT_INDEXENTRY_STROKE));
33
m_aData
.emplace_back(
"zhuyin"
,
SvtResId
(STR_SVT_INDEXENTRY_ZHUYIN));
34
m_aData
.emplace_back(
"phonetic (alphanumeric first) (grouped by syllable)"
,
SvtResId
(STR_SVT_INDEXENTRY_PHONETIC_FS));
35
m_aData
.emplace_back(
"phonetic (alphanumeric first) (grouped by consonant)"
,
SvtResId
(STR_SVT_INDEXENTRY_PHONETIC_FC));
36
m_aData
.emplace_back(
"phonetic (alphanumeric last) (grouped by syllable)"
,
SvtResId
(STR_SVT_INDEXENTRY_PHONETIC_LS));
37
m_aData
.emplace_back(
"phonetic (alphanumeric last) (grouped by consonant)"
,
SvtResId
(STR_SVT_INDEXENTRY_PHONETIC_LC));
38
}
39
40
const
OUString&
IndexEntryResource::GetTranslation
(
const
OUString &r_Algorithm)
41
{
42
sal_Int32
nIndex
= r_Algorithm.indexOf(
'.'
);
43
OUString aLocaleFreeAlgorithm;
44
45
if
(
nIndex
== -1)
46
aLocaleFreeAlgorithm = r_Algorithm;
47
else
{
48
nIndex
+= 1;
49
aLocaleFreeAlgorithm = r_Algorithm.copy(
nIndex
);
50
}
51
52
for
(
size_t
i
= 0;
i
<
m_aData
.size(); ++
i
)
53
if
(aLocaleFreeAlgorithm ==
m_aData
[
i
].GetAlgorithm())
54
return
m_aData
[
i
].GetTranslation();
55
return
r_Algorithm;
56
}
57
58
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IndexEntryResource::IndexEntryResource
IndexEntryResource()
Definition:
indexentryres.cxx:26
IndexEntryResource::GetTranslation
const OUString & GetTranslation(const OUString &rAlgorithm)
Definition:
indexentryres.cxx:40
IndexEntryResource::m_aData
std::vector< IndexEntryResourceData > m_aData
Definition:
indexentryres.hxx:48
indexentryres.hxx
nIndex
sal_Int32 nIndex
i
int i
SvtResId
OUString SvtResId(TranslateId aId)
Definition:
svtresid.cxx:24
svtresid.hxx
Generated on Sun Jul 30 2023 04:42:53 for LibreOffice Module svtools (master) by
1.9.3