sync master with lastest vba changes
[ooovba.git] / reportdesign / source / ui / inc / DateTime.hxx
blob79e2e635fea2defdd01882c10a7f5dacff339fad
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: DateTime.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef RPTUI_DATETIME_HXX
31 #define RPTUI_DATETIME_HXX
33 #ifndef _DIALOG_HXX //autogen
34 #include <vcl/dialog.hxx>
35 #endif
36 #ifndef _FIXED_HXX //autogen
37 #include <vcl/fixed.hxx>
38 #endif
39 #include <vcl/lstbox.hxx>
40 #include <vcl/field.hxx>
41 #ifndef _SV_BUTTON_HXX
42 #include <vcl/button.hxx>
43 #endif
44 #include <com/sun/star/report/XReportDefinition.hpp>
45 #include <com/sun/star/util/XNumberFormats.hpp>
46 #include <com/sun/star/lang/Locale.hpp>
48 #include <svtools/dialogcontrolling.hxx>
50 namespace rptui
52 class OReportController;
53 /*************************************************************************
55 |* Groups and Sorting dialog
57 \************************************************************************/
58 class ODateTimeDialog : public ModalDialog
60 // FixedLine m_aFLDate;
61 CheckBox m_aDate;
62 FixedText m_aFTDateFormat;
63 ListBox m_aDateListBox;
64 FixedLine m_aFL0;
65 CheckBox m_aTime;
66 FixedText m_aFTTimeFormat;
67 ListBox m_aTimeListBox;
68 FixedLine m_aFL1;
69 OKButton m_aPB_OK;
70 CancelButton m_aPB_CANCEL;
71 HelpButton m_aPB_Help;
74 svt::ControlDependencyManager m_aDateControlling;
75 svt::ControlDependencyManager m_aTimeControlling;
77 ::rptui::OReportController* m_pController;
78 ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>
79 m_xHoldAlive;
80 ::com::sun::star::lang::Locale m_nLocale;
82 /** returns the frmat string
84 * \param _nNumberFormatKey the number format key
85 * \param _xFormats
86 * \param _bTime
87 * \return
89 ::rtl::OUString getFormatStringByKey(::sal_Int32 _nNumberFormatKey,const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats>& _xFormats,bool _bTime);
91 /** returns the number format key
92 @param _nNumberFormatIndex the number format index @see com::sun::star::i18n::NumberFormatIndex
94 sal_Int32 getFormatKey(sal_Bool _bDate) const;
96 DECL_LINK( CBClickHdl, CheckBox* );
97 ODateTimeDialog(const ODateTimeDialog&);
98 void operator =(const ODateTimeDialog&);
100 // fill methods
101 void InsertEntry(sal_Int16 _nNumberFormatId);
102 public:
103 ODateTimeDialog( Window* pParent
104 ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xHoldAlive
105 ,::rptui::OReportController* _pController);
106 virtual ~ODateTimeDialog();
107 virtual short Execute();
109 // =============================================================================
110 } // namespace rptui
111 // =============================================================================
112 #endif // RPTUI_DATETIME_HXX