1*9ee13d13SAndrew Rist /************************************************************** 2*9ee13d13SAndrew Rist * 3*9ee13d13SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9ee13d13SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9ee13d13SAndrew Rist * distributed with this work for additional information 6*9ee13d13SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9ee13d13SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9ee13d13SAndrew Rist * "License"); you may not use this file except in compliance 9*9ee13d13SAndrew Rist * with the License. You may obtain a copy of the License at 10*9ee13d13SAndrew Rist * 11*9ee13d13SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*9ee13d13SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9ee13d13SAndrew Rist * software distributed under the License is distributed on an 15*9ee13d13SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9ee13d13SAndrew Rist * KIND, either express or implied. See the License for the 17*9ee13d13SAndrew Rist * specific language governing permissions and limitations 18*9ee13d13SAndrew Rist * under the License. 19*9ee13d13SAndrew Rist * 20*9ee13d13SAndrew Rist *************************************************************/ 21*9ee13d13SAndrew Rist 22*9ee13d13SAndrew Rist 23cdf0e10cSrcweir #ifndef RPTUI_DATETIME_HXX 24cdf0e10cSrcweir #define RPTUI_DATETIME_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef _DIALOG_HXX //autogen 27cdf0e10cSrcweir #include <vcl/dialog.hxx> 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 30cdf0e10cSrcweir #include <vcl/fixed.hxx> 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir #include <vcl/lstbox.hxx> 33cdf0e10cSrcweir #include <vcl/field.hxx> 34cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX 35cdf0e10cSrcweir #include <vcl/button.hxx> 36cdf0e10cSrcweir #endif 37cdf0e10cSrcweir #include <com/sun/star/report/XReportDefinition.hpp> 38cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormats.hpp> 39cdf0e10cSrcweir #include <com/sun/star/lang/Locale.hpp> 40cdf0e10cSrcweir 41cdf0e10cSrcweir #include <svtools/dialogcontrolling.hxx> 42cdf0e10cSrcweir 43cdf0e10cSrcweir namespace rptui 44cdf0e10cSrcweir { 45cdf0e10cSrcweir class OReportController; 46cdf0e10cSrcweir /************************************************************************* 47cdf0e10cSrcweir |* 48cdf0e10cSrcweir |* Groups and Sorting dialog 49cdf0e10cSrcweir |* 50cdf0e10cSrcweir \************************************************************************/ 51cdf0e10cSrcweir class ODateTimeDialog : public ModalDialog 52cdf0e10cSrcweir { 53cdf0e10cSrcweir // FixedLine m_aFLDate; 54cdf0e10cSrcweir CheckBox m_aDate; 55cdf0e10cSrcweir FixedText m_aFTDateFormat; 56cdf0e10cSrcweir ListBox m_aDateListBox; 57cdf0e10cSrcweir FixedLine m_aFL0; 58cdf0e10cSrcweir CheckBox m_aTime; 59cdf0e10cSrcweir FixedText m_aFTTimeFormat; 60cdf0e10cSrcweir ListBox m_aTimeListBox; 61cdf0e10cSrcweir FixedLine m_aFL1; 62cdf0e10cSrcweir OKButton m_aPB_OK; 63cdf0e10cSrcweir CancelButton m_aPB_CANCEL; 64cdf0e10cSrcweir HelpButton m_aPB_Help; 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67cdf0e10cSrcweir svt::ControlDependencyManager m_aDateControlling; 68cdf0e10cSrcweir svt::ControlDependencyManager m_aTimeControlling; 69cdf0e10cSrcweir 70cdf0e10cSrcweir ::rptui::OReportController* m_pController; 71cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> 72cdf0e10cSrcweir m_xHoldAlive; 73cdf0e10cSrcweir ::com::sun::star::lang::Locale m_nLocale; 74cdf0e10cSrcweir 75cdf0e10cSrcweir /** returns the frmat string 76cdf0e10cSrcweir * 77cdf0e10cSrcweir * \param _nNumberFormatKey the number format key 78cdf0e10cSrcweir * \param _xFormats 79cdf0e10cSrcweir * \param _bTime 80cdf0e10cSrcweir * \return 81cdf0e10cSrcweir */ 82cdf0e10cSrcweir ::rtl::OUString getFormatStringByKey(::sal_Int32 _nNumberFormatKey,const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats>& _xFormats,bool _bTime); 83cdf0e10cSrcweir 84cdf0e10cSrcweir /** returns the number format key 85cdf0e10cSrcweir @param _nNumberFormatIndex the number format index @see com::sun::star::i18n::NumberFormatIndex 86cdf0e10cSrcweir */ 87cdf0e10cSrcweir sal_Int32 getFormatKey(sal_Bool _bDate) const; 88cdf0e10cSrcweir 89cdf0e10cSrcweir DECL_LINK( CBClickHdl, CheckBox* ); 90cdf0e10cSrcweir ODateTimeDialog(const ODateTimeDialog&); 91cdf0e10cSrcweir void operator =(const ODateTimeDialog&); 92cdf0e10cSrcweir 93cdf0e10cSrcweir // fill methods 94cdf0e10cSrcweir void InsertEntry(sal_Int16 _nNumberFormatId); 95cdf0e10cSrcweir public: 96cdf0e10cSrcweir ODateTimeDialog( Window* pParent 97cdf0e10cSrcweir ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xHoldAlive 98cdf0e10cSrcweir ,::rptui::OReportController* _pController); 99cdf0e10cSrcweir virtual ~ODateTimeDialog(); 100cdf0e10cSrcweir virtual short Execute(); 101cdf0e10cSrcweir }; 102cdf0e10cSrcweir // ============================================================================= 103cdf0e10cSrcweir } // namespace rptui 104cdf0e10cSrcweir // ============================================================================= 105cdf0e10cSrcweir #endif // RPTUI_DATETIME_HXX 106