14e8031e0SArmin Le Grand /************************************************************** 24e8031e0SArmin Le Grand * 34e8031e0SArmin Le Grand * Licensed to the Apache Software Foundation (ASF) under one 44e8031e0SArmin Le Grand * or more contributor license agreements. See the NOTICE file 54e8031e0SArmin Le Grand * distributed with this work for additional information 64e8031e0SArmin Le Grand * regarding copyright ownership. The ASF licenses this file 74e8031e0SArmin Le Grand * to you under the Apache License, Version 2.0 (the 84e8031e0SArmin Le Grand * "License"); you may not use this file except in compliance 94e8031e0SArmin Le Grand * with the License. You may obtain a copy of the License at 104e8031e0SArmin Le Grand * 114e8031e0SArmin Le Grand * http://www.apache.org/licenses/LICENSE-2.0 124e8031e0SArmin Le Grand * 134e8031e0SArmin Le Grand * Unless required by applicable law or agreed to in writing, 144e8031e0SArmin Le Grand * software distributed under the License is distributed on an 154e8031e0SArmin Le Grand * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 164e8031e0SArmin Le Grand * KIND, either express or implied. See the License for the 174e8031e0SArmin Le Grand * specific language governing permissions and limitations 184e8031e0SArmin Le Grand * under the License. 194e8031e0SArmin Le Grand * 204e8031e0SArmin Le Grand *************************************************************/ 214e8031e0SArmin Le Grand 224e8031e0SArmin Le Grand #ifndef SC_PROPERTYPANEL_NUMFORMAT_HXX 234e8031e0SArmin Le Grand #define SC_PROPERTYPANEL_NUMFORMAT_HXX 244e8031e0SArmin Le Grand 254e8031e0SArmin Le Grand #include <sfx2/sidebar/ControllerItem.hxx> 264e8031e0SArmin Le Grand #include <sfx2/sidebar/IContextChangeReceiver.hxx> 274e8031e0SArmin Le Grand #include <boost/scoped_ptr.hpp> 284e8031e0SArmin Le Grand 294e8031e0SArmin Le Grand class FixedText; 304e8031e0SArmin Le Grand class ListBox; 314e8031e0SArmin Le Grand class NumericField; 324e8031e0SArmin Le Grand 334e8031e0SArmin Le Grand namespace sc { namespace sidebar { 344e8031e0SArmin Le Grand 354e8031e0SArmin Le Grand class NumberFormatPropertyPanel 364e8031e0SArmin Le Grand : public Control, 374e8031e0SArmin Le Grand public ::sfx2::sidebar::IContextChangeReceiver, 384e8031e0SArmin Le Grand public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 394e8031e0SArmin Le Grand { 404e8031e0SArmin Le Grand public: 414e8031e0SArmin Le Grand public: 424e8031e0SArmin Le Grand static NumberFormatPropertyPanel* Create( 434e8031e0SArmin Le Grand Window* pParent, 444e8031e0SArmin Le Grand const cssu::Reference<css::frame::XFrame>& rxFrame, 454e8031e0SArmin Le Grand SfxBindings* pBindings); 464e8031e0SArmin Le Grand 474e8031e0SArmin Le Grand virtual void DataChanged( 484e8031e0SArmin Le Grand const DataChangedEvent& rEvent); 494e8031e0SArmin Le Grand 504e8031e0SArmin Le Grand virtual void HandleContextChange( 514e8031e0SArmin Le Grand const ::sfx2::sidebar::EnumContext aContext); 524e8031e0SArmin Le Grand 534e8031e0SArmin Le Grand virtual void NotifyItemUpdate( 544e8031e0SArmin Le Grand const sal_uInt16 nSId, 554e8031e0SArmin Le Grand const SfxItemState eState, 5645da7d5eSAndre Fischer const SfxPoolItem* pState, 5745da7d5eSAndre Fischer const bool bIsEnabled); 584e8031e0SArmin Le Grand 594e8031e0SArmin Le Grand SfxBindings* GetBindings(); 604e8031e0SArmin Le Grand 61*6a606da0SAndre Fischer virtual void Resize (void); 62*6a606da0SAndre Fischer 634e8031e0SArmin Le Grand private: 644e8031e0SArmin Le Grand //ui controls 654e8031e0SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFtCategory; 664e8031e0SArmin Le Grand ::boost::scoped_ptr< ListBox > mpLbCategory; 674e8031e0SArmin Le Grand ::boost::scoped_ptr< Window > mpTBCategoryBackground; 684e8031e0SArmin Le Grand ::boost::scoped_ptr< ToolBox > mpTBCategory; 694e8031e0SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFtDecimals; 704e8031e0SArmin Le Grand ::boost::scoped_ptr< NumericField > mpEdDecimals; 714e8031e0SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFtLeadZeroes; 724e8031e0SArmin Le Grand ::boost::scoped_ptr< NumericField > mpEdLeadZeroes; 734e8031e0SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpBtnNegRed; 744e8031e0SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpBtnThousand; 754e8031e0SArmin Le Grand 764e8031e0SArmin Le Grand ::sfx2::sidebar::ControllerItem maNumFormatControl; 774e8031e0SArmin Le Grand ::sfx2::sidebar::ControllerItem maFormatControl; 784e8031e0SArmin Le Grand 794e8031e0SArmin Le Grand sal_uInt16 mnCategorySelected; 804e8031e0SArmin Le Grand 814e8031e0SArmin Le Grand cssu::Reference<css::frame::XFrame> mxFrame; 824e8031e0SArmin Le Grand ::sfx2::sidebar::EnumContext maContext; 834e8031e0SArmin Le Grand SfxBindings* mpBindings; 844e8031e0SArmin Le Grand 854e8031e0SArmin Le Grand DECL_LINK(NumFormatHdl, ToolBox*); 864e8031e0SArmin Le Grand DECL_LINK(NumFormatSelectHdl, ListBox*); 874e8031e0SArmin Le Grand DECL_LINK(NumFormatValueHdl, void*); 884e8031e0SArmin Le Grand 894e8031e0SArmin Le Grand // constructor/destuctor 904e8031e0SArmin Le Grand NumberFormatPropertyPanel( 914e8031e0SArmin Le Grand Window* pParent, 924e8031e0SArmin Le Grand const cssu::Reference<css::frame::XFrame>& rxFrame, 934e8031e0SArmin Le Grand SfxBindings* pBindings); 944e8031e0SArmin Le Grand virtual ~NumberFormatPropertyPanel(); 954e8031e0SArmin Le Grand 964e8031e0SArmin Le Grand void Initialize(); 974e8031e0SArmin Le Grand }; 984e8031e0SArmin Le Grand 994e8031e0SArmin Le Grand } } // end of namespace ::sc::sidebar 1004e8031e0SArmin Le Grand 1013fc59d38SAndre Fischer #endif 1024e8031e0SArmin Le Grand 1034e8031e0SArmin Le Grand // eof 104