Coverage Report

Created: 2025-12-08 09:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sfx2/source/dialog/dialoghelper.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/localedatawrapper.hxx>
11
#include <sfx2/dialoghelper.hxx>
12
#include <tools/datetime.hxx>
13
#include <vcl/outdev.hxx>
14
15
Size getParagraphPreviewOptimalSize(const OutputDevice& rReference)
16
0
{
17
0
    return rReference.LogicToPixel(Size(68, 112), MapMode(MapUnit::MapAppFont));
18
0
}
19
20
Size getDrawPreviewOptimalSize(const OutputDevice& rReference)
21
0
{
22
0
    return rReference.LogicToPixel(Size(88, 42), MapMode(MapUnit::MapAppFont));
23
0
}
24
25
Size getPreviewStripSize(const OutputDevice& rReference)
26
0
{
27
0
    return rReference.LogicToPixel(Size(70, 40), MapMode(MapUnit::MapAppFont));
28
0
}
29
30
Size getPreviewOptionsSize(const OutputDevice& rReference)
31
0
{
32
0
    return rReference.LogicToPixel(Size(70, 27), MapMode(MapUnit::MapAppFont));
33
0
}
34
35
OUString getWidestDateTime(const LocaleDataWrapper& rWrapper, bool bWithSec)
36
0
{
37
0
    Date aDate(22, 12, 2000);
38
0
    tools::Time aTime(22, 59, 59);
39
0
    DateTime aDateTime(aDate, aTime);
40
0
    return formatDateTime(aDateTime, rWrapper, bWithSec);
41
0
}
42
43
OUString formatDateTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper, bool bWithSec)
44
0
{
45
0
    return rWrapper.getDate(rDateTime) + " " + rWrapper.getTime(rDateTime, bWithSec);
46
0
}
47
48
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */