Coverage Report

Created: 2025-07-07 10:01

/src/libreoffice/svtools/source/config/htmlcfg.cxx
Line
Count
Source (jump to first uncovered line)
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
#include <sal/config.h>
21
22
#include <svtools/htmlcfg.hxx>
23
#include <unotools/syslocale.hxx>
24
#include <officecfg/Office/Common.hxx>
25
26
namespace SvxHtmlOptions
27
{
28
sal_uInt16 GetFontSize(sal_uInt16 nPos)
29
0
{
30
0
    switch (nPos)
31
0
    {
32
0
        case 0:
33
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::get();
34
0
        case 1:
35
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::get();
36
0
        case 2:
37
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::get();
38
0
        case 3:
39
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::get();
40
0
        case 4:
41
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::get();
42
0
        case 5:
43
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::get();
44
0
        case 6:
45
0
            return officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_7::get();
46
0
    }
47
0
    assert(false);
48
0
    return 0;
49
0
}
50
51
sal_uInt16 GetExportMode()
52
0
{
53
0
    sal_Int32 nExpMode = officecfg::Office::Common::Filter::HTML::Export::Browser::get();
54
0
    switch (nExpMode)
55
0
    {
56
0
        case 1:
57
0
            nExpMode = HTML_CFG_MSIE;
58
0
            break;
59
0
        case 3:
60
0
            nExpMode = HTML_CFG_WRITER;
61
0
            break;
62
0
        case 4:
63
0
        default:
64
0
            nExpMode = HTML_CFG_NS40;
65
0
            break;
66
0
    }
67
0
    return nExpMode;
68
0
}
69
70
} // namespace SvxHtmlOptions
71
72
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */