Coverage Report

Created: 2026-10-14 09:33

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/vcl/source/weld/DateFormatter.cxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 <tools/date.hxx>
11
#include <unotools/calendarwrapper.hxx>
12
#include <vcl/vclenum.hxx>
13
#include <vcl/weld/DateFormatter.hxx>
14
15
namespace weld
16
{
17
DateFormatter::DateFormatter(weld::Entry& rEntry)
18
0
    : EntryFormatter(rEntry)
19
0
    , m_eFormat(ExtDateFieldFormat::SystemShort)
20
0
{
21
0
    Init();
22
0
}
23
24
void DateFormatter::Init()
25
0
{
26
0
    SetFormatValueHdl(LINK(this, DateFormatter, FormatOutputHdl));
27
0
    SetParseTextHdl(LINK(this, DateFormatter, ParseInputHdl));
28
29
0
    SetMin(Date(1, 1, 1900));
30
0
    SetMax(Date(31, 12, 2200));
31
0
}
32
33
void DateFormatter::SetExtDateFormat(ExtDateFieldFormat eFormat)
34
0
{
35
0
    m_eFormat = eFormat;
36
0
    ReFormat();
37
0
}
38
39
0
DateFormatter::~DateFormatter() = default;
40
}
41
42
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */