LibreOffice Module sfx2 (master) 1
dialoghelper.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
11#include <sfx2/dialoghelper.hxx>
12#include <tools/datetime.hxx>
13#include <vcl/outdev.hxx>
14
16{
17 return rReference.LogicToPixel(Size(68, 112), MapMode(MapUnit::MapAppFont));
18}
19
21{
22 return rReference.LogicToPixel(Size(88, 42), MapMode(MapUnit::MapAppFont));
23}
24
26{
27 return rReference.LogicToPixel(Size(70, 40), MapMode(MapUnit::MapAppFont));
28}
29
31{
32 return rReference.LogicToPixel(Size(70, 27), MapMode(MapUnit::MapAppFont));
33}
34
35OUString getWidestDateTime(const LocaleDataWrapper& rWrapper, bool bWithSec)
36{
37 Date aDate(22, 12, 2000);
38 tools::Time aTime(22, 59, 59);
39 DateTime aDateTime(aDate, aTime);
40 return formatDateTime(aDateTime, rWrapper, bWithSec);
41}
42
43OUString formatDateTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper, bool bWithSec)
44{
45 return rWrapper.getDate(rDateTime) + " " + rWrapper.getTime(rDateTime, bWithSec);
46}
47
48/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString getDate(const Date &rDate) const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Size getPreviewOptionsSize(const OutputDevice &rReference)
Size getDrawPreviewOptimalSize(const OutputDevice &rReference)
Size getParagraphPreviewOptimalSize(const OutputDevice &rReference)
OUString getWidestDateTime(const LocaleDataWrapper &rWrapper, bool bWithSec)
OUString formatDateTime(const DateTime &rDateTime, const LocaleDataWrapper &rWrapper, bool bWithSec)
Size getPreviewStripSize(const OutputDevice &rReference)