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 
27 namespace rptui
28 {
29 class 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::ToggleButton&, void);
65  ODateTimeDialog(const ODateTimeDialog&) = delete;
66  void operator =(const ODateTimeDialog&) = delete;
67 
68  // fill methods
69  void InsertEntry(sal_Int16 _nNumberFormatId);
70 public:
72  const 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: */
std::unique_ptr< weld::Label > m_xFTTimeFormat
Definition: DateTime.hxx:46
sal_Int32 getFormatKey(bool _bDate) const
returns the number format key
Definition: DateTime.cxx:190
virtual short run() override
Definition: DateTime.cxx:90
std::unique_ptr< weld::ComboBox > m_xTimeListBox
Definition: DateTime.hxx:47
css::lang::Locale m_nLocale
Definition: DateTime.hxx:40
void operator=(const ODateTimeDialog &)=delete
std::unique_ptr< weld::Label > m_xFTDateFormat
Definition: DateTime.hxx:43
std::unique_ptr< weld::CheckButton > m_xDate
Definition: DateTime.hxx:42
::rptui::OReportController * m_pController
Definition: DateTime.hxx:37
css::uno::Reference< css::report::XSection > m_xHoldAlive
Definition: DateTime.hxx:39
std::unique_ptr< weld::Button > m_xPB_OK
Definition: DateTime.hxx:48
void InsertEntry(sal_Int16 _nNumberFormatId)
Definition: DateTime.cxx:74
std::unique_ptr< weld::ComboBox > m_xDateListBox
Definition: DateTime.hxx:44
DECL_LINK(CBClickHdl, weld::ToggleButton &, void)
std::unique_ptr< weld::CheckButton > m_xTime
Definition: DateTime.hxx:45
ODateTimeDialog(const ODateTimeDialog &)=delete
OUString getFormatStringByKey(::sal_Int32 _nNumberFormatKey, const css::uno::Reference< css::util::XNumberFormats > &_xFormats, bool _bTime)
returns the format string
Definition: DateTime.cxx:145