Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/unotools/source/i18n/caserotate.cxx
Line
Count
Source
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 <unotools/caserotate.hxx>
11
#include <i18nutil/transliteration.hxx>
12
13
//TODO Use XCharacterClassification::getStringType to determine the current
14
//(possibly mixed) case type and rotate to the next one
15
16
TransliterationFlags RotateTransliteration::getNextMode()
17
0
{
18
0
    TransliterationFlags nMode = TransliterationFlags::NONE;
19
20
0
    switch (nF3ShiftCounter)
21
0
    {
22
0
        case 0:
23
0
            nMode = TransliterationFlags::TITLE_CASE;
24
0
            break;
25
0
        case 1: //tdf#116315
26
0
            nMode = TransliterationFlags::SENTENCE_CASE;
27
0
            break;
28
0
        case 2:
29
0
            nMode = TransliterationFlags::LOWERCASE_UPPERCASE;
30
0
            break;
31
0
        default:
32
0
        case 3:
33
0
            nMode = TransliterationFlags::UPPERCASE_LOWERCASE;
34
0
            nF3ShiftCounter = -1;
35
0
            break;
36
0
    }
37
38
0
    nF3ShiftCounter++;
39
40
0
    return nMode;
41
0
}
42
43
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */