1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef RPTUI_DATETIME_HXX
20 #define RPTUI_DATETIME_HXX
22 #include <vcl/dialog.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/field.hxx>
26 #include <vcl/button.hxx>
27 #include <com/sun/star/report/XReportDefinition.hpp>
28 #include <com/sun/star/util/XNumberFormats.hpp>
29 #include <com/sun/star/lang/Locale.hpp>
31 #include <svtools/dialogcontrolling.hxx>
35 class OReportController
;
36 /*************************************************************************
38 |* Groups and Sorting dialog
40 \************************************************************************/
41 class ODateTimeDialog
: public ModalDialog
44 FixedText m_aFTDateFormat
;
45 ListBox m_aDateListBox
;
48 FixedText m_aFTTimeFormat
;
49 ListBox m_aTimeListBox
;
52 CancelButton m_aPB_CANCEL
;
53 HelpButton m_aPB_Help
;
56 svt::ControlDependencyManager m_aDateControlling
;
57 svt::ControlDependencyManager m_aTimeControlling
;
59 ::rptui::OReportController
* m_pController
;
60 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
>
62 ::com::sun::star::lang::Locale m_nLocale
;
64 /** returns the frmat string
66 * \param _nNumberFormatKey the number format key
71 OUString
getFormatStringByKey(::sal_Int32 _nNumberFormatKey
,const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormats
>& _xFormats
,bool _bTime
);
73 /** returns the number format key
74 @param _nNumberFormatIndex the number format index @see com::sun::star::i18n::NumberFormatIndex
76 sal_Int32
getFormatKey(sal_Bool _bDate
) const;
78 DECL_LINK( CBClickHdl
, CheckBox
* );
79 ODateTimeDialog(const ODateTimeDialog
&);
80 void operator =(const ODateTimeDialog
&);
83 void InsertEntry(sal_Int16 _nNumberFormatId
);
85 ODateTimeDialog( Window
* pParent
86 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
>& _xHoldAlive
87 ,::rptui::OReportController
* _pController
);
88 virtual ~ODateTimeDialog();
89 virtual short Execute();
91 // =============================================================================
93 // =============================================================================
94 #endif // RPTUI_DATETIME_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */