LibreOffice Module reportdesign (master) 1
DateTime.hxx
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 * 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#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATETIME_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATETIME_HXX
21
22#include <vcl/weld.hxx>
23#include <com/sun/star/report/XSection.hpp>
24#include <com/sun/star/util/XNumberFormats.hpp>
25#include <com/sun/star/lang/Locale.hpp>
26
27namespace rptui
28{
29class OReportController;
30/*************************************************************************
31|*
32|* Groups and Sorting dialog
33|*
34\************************************************************************/
36{
38 css::uno::Reference< css::report::XSection>
40 css::lang::Locale m_nLocale;
41
42 std::unique_ptr<weld::CheckButton> m_xDate;
43 std::unique_ptr<weld::Label> m_xFTDateFormat;
44 std::unique_ptr<weld::ComboBox> m_xDateListBox;
45 std::unique_ptr<weld::CheckButton> m_xTime;
46 std::unique_ptr<weld::Label> m_xFTTimeFormat;
47 std::unique_ptr<weld::ComboBox> m_xTimeListBox;
48 std::unique_ptr<weld::Button> m_xPB_OK;
49
57 OUString getFormatStringByKey(::sal_Int32 _nNumberFormatKey,const css::uno::Reference< css::util::XNumberFormats>& _xFormats,bool _bTime);
58
62 sal_Int32 getFormatKey(bool _bDate) const;
63
64 DECL_LINK(CBClickHdl, weld::Toggleable&, void);
66 void operator =(const ODateTimeDialog&) = delete;
67
68 // fill methods
69 void InsertEntry(sal_Int16 _nNumberFormatId);
70public:
72 css::uno::Reference< css::report::XSection> _xHoldAlive,
73 ::rptui::OReportController* _pController);
74 virtual short run() override;
75};
76
77} // namespace rptui
78
79#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATETIME_HXX
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::rptui::OReportController * m_pController
Definition: DateTime.hxx:37
OUString getFormatStringByKey(::sal_Int32 _nNumberFormatKey, const css::uno::Reference< css::util::XNumberFormats > &_xFormats, bool _bTime)
returns the format string
Definition: DateTime.cxx:147
std::unique_ptr< weld::ComboBox > m_xDateListBox
Definition: DateTime.hxx:44
std::unique_ptr< weld::Label > m_xFTTimeFormat
Definition: DateTime.hxx:46
ODateTimeDialog(const ODateTimeDialog &)=delete
css::uno::Reference< css::report::XSection > m_xHoldAlive
Definition: DateTime.hxx:39
virtual short run() override
Definition: DateTime.cxx:91
sal_Int32 getFormatKey(bool _bDate) const
returns the number format key
Definition: DateTime.cxx:192
void InsertEntry(sal_Int16 _nNumberFormatId)
Definition: DateTime.cxx:75
std::unique_ptr< weld::CheckButton > m_xTime
Definition: DateTime.hxx:45
std::unique_ptr< weld::CheckButton > m_xDate
Definition: DateTime.hxx:42
ODateTimeDialog(weld::Window *pParent, css::uno::Reference< css::report::XSection > _xHoldAlive, ::rptui::OReportController *_pController)
std::unique_ptr< weld::ComboBox > m_xTimeListBox
Definition: DateTime.hxx:47
void operator=(const ODateTimeDialog &)=delete
css::lang::Locale m_nLocale
Definition: DateTime.hxx:40
DECL_LINK(CBClickHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Button > m_xPB_OK
Definition: DateTime.hxx:48
std::unique_ptr< weld::Label > m_xFTDateFormat
Definition: DateTime.hxx:43